(R.menu.main, menu); return true;} Handle Menu Event @overridepublic boolean onoptionsitemselected (MenuItem item) {Drawview Drawview = (drawview) Findviewbyid ( R.ID.DRAWVIEW1), switch (Item.getitemid ()) {//sets the method to run for the menu subkey with ID menu_exit.Case R.id.menu1_sub1:drawview.paint.setstrokewidth (1); Break;case R.id.menu1_sub2:drawview.paint.setstrokewidth (5 ); Break;case r.id.menu1_sub3:drawview.paint.setstrokewidth (Break;case); R.ID.MENU1_SUB4: DrawView.paint.setStro
(image:didFinishSavingWithError:contextInfo:), nil);}-(void) Image: (UIImage *) image didfinishsavingwitherror: (nserror *) error ContextInfo: (void *) ContextInfo{if (Error) {[Mbprogresshud showerror:@ "Save failed, please check if the app has access to the album"];} else {[Mbprogresshud showsuccess:@ "save Success"];}}8. Create a new class for Captureview(used to, only need to send in the required view)In the CaptureView.h+ (UIImage *) Captureimage
ScalesketchpaddemoProject Address:Demo APK experience DownloadDemo2 apk Experience DownloadUsage:Enter the project root directory: Https://github.com/ShaunSheep/ScaleSketchPadDemoClone or download project to local,Open Android Studio->file->new->import new moudle-> Check your local app or AAP2This project consists of two modules
App1 for ordinary drawing
a simple drawing board development reprint please indicate source:http://blog.csdn.net/u012637501
(
embedded _ small J Sky )
first, drawing board principle1. Linear effectThe drawing board can a
= new Canvas (BASEBITMAP) that can be modified; * Create a canvas canvas.drawcolor (color.white); *///gets the starting position of the landing point startx = (int) event.getx (); starty = (int) event.gety (); Break;case motionevent.action_move:// Gestures move when System.out.println ("Finger moves"), int stopx = (int) event.getx (), int stopy = (int) event.gety (); Canvas.drawline (StartX , Starty, Stopx, stopy, paint); Iv.setimagebitmap (basebitmap);//regain the start position of the brush s
Drawing board, can be drawn by line or fill the way, you can set the color of the brush, thickness, and be able to save the painted content as a JPG file (save location is Sdcard/huaban): Http://www.dwz.cn/zbOoL NBSP ; , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp / nbsp
Drawing board, can be drawn by line or fill the way, you can set the color of the brush, thickness, and be able to save the painted content as a JPG file (save location is Sdcard/huaban): Http://www.dwz.cn/zbOoL NBSP ; NBS P NBS P NBSP;NBS P , NB Sp NBS P NBS P NBS P ,
First, the Android side of the lagThe Android app is prone to lag during specific use, such as having a meal when viewing a page, a slow response after switching tabs, or a slow operation when it comes to sliding.Second, the reasons for the lagThere may be many reasons for the lag, such as:1. High CPU2. Memory Overflow3. Main thread processing IO operation, etc..
as the rectangle we were allow to draw on.
* We do this to chache the bitmap so We don ' t need to
* Recreate it each time draw () is called since it
* Takes a few milliseconds.
*/
private void Generatepatternbitmap () {
if (getbounds (). Width () 0 | | getbounds (). Height () 0) {
return;
}
Mbitmap = Bitmap.createbitmap (GetBounds (). Width (), getbounds (). Height (), config.argb_8888);
Canvas canvas = new Canvas (MBITMAP);
Rect r = new Rect ();
Boolean
PrefaceAn excellent application is not only to have attractive features and interactions, but also to have high performance requirements. Mobile phone running Android system, although the configuration in the continuous upgrade, but still can not be compared with the PC, the PC does not have the same large memory and high-performance CPU, so in the development of Android applications can not be unlimited us
PrefaceAn excellent application is not only to have attractive features and interactions, but also to have high performance requirements. Mobile phone running Android system, although the configuration in the continuous upgrade, but still can not be compared with the PC, the PC does not have the same large memory and high-performance CPU, so in the development of Android applications can not be unlimited us
them, Nnibsize is what I call a dot pixel (100*100). An example would be clearer:* My device is 5.7inch, resolution is 1920*1080 (PX), calculate the device PPIThis is to get my device PPI. And my device was filed near the drawable? I debug my Code, I found 800*800 picture placed under-HDPI, get the size of the figure for 1467*1467, why this is the value. In the above code, I obtained a nearest pixel density, found that dm.density obtained a value of 2.75, that is, our 386 pixel density near the
Android encapsulates this approach, and we don't have permission to call it, so we can just go through the aidl and use the Java reflection mechanism to invoke the system-level approach.
The following code: (note more detailed)
/** * Role:-----Get the size of the package-----* @param context * @param pkgname app's package name * @param appInfo entity class for storing some information about the app/PU
exit. Attention!! This file will eventually be packaged in ramdisk_uboot.img, so you need to burn the system while burning it, otherwise the change fails.2) app start-upOpen Device/samsung/smdk4x12/device.mk, take LEDs for example+ = device/samsung/smdk4x12/apk/topeet/ledtest/ledtest.apk:system/app/+ = device /samsung/smdk4x12/apk/topeet/ledtest/libled.so:system/lib/libled.soNote: Noti
++ ++
This article is original on this site. You are welcome to repost it! Reprinted please indicate the source:
Http://blog.csdn.net/mr_raptor/article/details/6598891
++ ++
Environment Introduction:
1. ubuntu 10.10, used as the Android compiling environment, and used NFS to mount the 6410 Development Board as the root file system.
2. android uses friendly sourc
This article is forwarded to the Forum information: http://www.topeetboard.comRecommended Learning embedded Development Board platform: ITOP-4412 Development BoardHere's an image from Google that shows the main components of the Android system.As can be seen, the Android system architecture consists of 5 parts, namely: Linux Kernel,
definitions to another function usb_oflog. This function needs to be modified by ourselves. Add the following at the end of core. C:
# Include See the android log rule reference. Then re-compile and you will be able to see the cute logs.
Updated on November 4.26
You have already run on your own Development Board. There is an image output, but it is only a two-value graph. This should be a problem when
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.