Discover notepad for android phone, include the articles, news, trends, analysis and practical advice about notepad for android phone on alibabacloud.com
set the scaleType attribute of ImageVIew to fitCenter in the XML file, and then set setScaleType (ScaleType) before the setOnTouchListener () method of ImageVIew. MATRIX); but this method is not successful, and the image is still in the upper left corner. Another method is to calculate the height and width of the mobile phone screen and find the point in the center of the image (x, y), and then use the translation of the Matrix to reach this position
. drawBitmap (bitmap, frameSize + 1, frameSize + 1, paint); return bitmapbg ;}
Who will be responsible for the Android notepad project? We are going to take the Android course. We need to prepare an Android notepad project at the end of the course.
. getSpanStart (span); int end = s. getSpanEnd (span); // find the image if (selectionStart> = start selectionStart
Now, you can view images and play recordings.
Who will be responsible for the Android notepad project? We are going to take the Android course. We need to prepare an Android
Kaiqiyu
As the saying goes, "regular reading of three hundred Tang poems will not make poems, but will also sing ". Recently, I have collected a lot of sample code for Android. I learned a lot from the reading and Experiment of the Code to develop my plan for writing this series. The goal is to implement it step by step with the instance, learn about Android development from "doing.This is the first article
Continue to complete the SDK notepad example. Previously, the functions of the entire example are roughly divided:1. display the note list;
2. Edit, view, and delete the tabs;
3. Edit the tab title;
4. Real-time folder of the tab Program (desktop shortcut creation)
[Update] free source code: detailed source code for notepad examples under Android SDK
In the prev
Step1:myProgram.java source files using Notepad editingThe Step2:compiler compiler uses the JAVAC commandGenerate Myprogram.class Bytecode filesStep3. Interpreter interpreter using Java commandsExplain the running programExample:Add a text file to a path and rename it to Helloworld.java, for example: E:\android\code\HelloWorld.javaEdit the file with Notepad and e
cannot be centered. the first way to find a solution online is to set ImageView's ScaleType property to Fitcenter in the XML file, and then set Setontouchlistener before the ImageView setscal () method. EType (Scaletype.matrix); But this method I did not succeed, the picture initially or in the upper left corner, the other way is to calculate the phone screen height and width, to the image center point (x, Y), and then through the matrix translation
Notepad (8) for android projects ----- withdrawal, restoration, and clearing of the canvas Function
Finally, I will make a gif image. Check whether the dynamic figure below is similar to the QQ whiteboard function.
Previously, only the drawing function on the canvas was implemented. Therefore, the custom view was directly written into the activity. This section aims to implement the function of revoking,
The example of this article for you to share the intent how to achieve a simple Notepad function of the demonstration process for your reference, the specific content as follows
1, run the screenshot
Clicking "..." in the upper-right corner will pop up the Add menu item, and a record will pop up the shortcut menu "Delete" item.
2. Main design Steps
(1) Adding references
Right-click "Reference" to "Add Reference" and check "System.Data" and "Sys
In the Android UI development often encounter the image of the zoom, such as Notepad, now the picture is relatively large, if the original image is placed directly on the screen without zooming, it will occupy the entire screen, and sometimes the picture will be larger than the screen, then can not fully display the entire picture, so, it must be scaled, But in the scaling, how to zoom, long and wide scalin
Android project notepad (12) ----- proportional scaling of images and adding borders to imagesThis article is my learning notes, welcome to reprint, but please note the Source: http://blog.csdn.net/jesson20121020
In Android UI development, image scaling is often encountered. For example, in notepad, the current images
In this tutorial, a simple list interface will be created, allowing users to add and delete, but not editing. Includes the following content:
◆ Basic knowledge of ListActivities and how to create menu items.
◆ How to use the SQLite database to access data.
◆ How to use ArrayAdapter to bind data to ListView (the simplest way ).
◆ Basic Layout, including how to display a ListView, how to insert a menu item to a menu, and how to respond to the menu
Step 1 create a project
Use Eclipse to create a pr
audition recording Activityif (Path.substring (Path.length ()- 3, Path.length ()). Equals ("Amr")) {Intent Intent = new Intent (addactivity.this,showrecord.class); Intent.putextra (" Audiopath ", path); startactivity (intent);} Picture, then jump to view the image of the interface else{//there are two ways to view the picture, the first is to directly call the system's library to view the picture, the second is to customize the activity//call system library to view the picture/*intent Intent =
Dialoginterface.onclicklistener () {@Overridepublic void OnClick ( Dialoginterface Dialog, int which) {Dialog.dismiss ();}}); Alertdialogbuilder.create (). Show (); }At this point, all the functions of the artboard have been implemented.In fact, there is a more interesting function, is to set a pencil icon for the brush, the main principle is that in the custom view of the OnDraw method, the pencil picture is loaded in, and set the picture to move along the path.In the OnDraw method in
Android notepad NoteBook and androidnotebook
It is also transplanted from the mtk sdk and can be used to classify events.
The specific code can be viewed on GitHub. The link is at the end of the article. Below is:
Main Activity, Note list:
package com.zms.notebook;import android.app.ActionBar;import android.app.AlertDialog;import android.app.ListActivity;import android.app.ProgressDialog;import android.co
Presumably everyone has used QQ whiteboard function, there are two main, one is the graffiti function, in fact, similar to the previous section of the artboard function, and the other is handwritten, that notepad how can not this function, today to add handwriting for our Notepad.First, look at the effect:See, is not the heartbeat? Then hurry up to do it, in fact, the handwriting function is not difficult to achieve, is generally full-screen writing,
Android project notepad (13) ----- view pictures and play recordings
This article is my learning notes, welcome to reprint, but please note the Source: http://blog.csdn.net/jesson20121020
Today, we will implement the function of viewing images and recordings. When editing or browsing the notebook, click an image to open a custom Activity (of course, you can also call the image library of the system to vi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.