Android learning notes-Menu (2), android learning notes
Knowledge point:
This time, we will continue the learning of menus not finished in the previous article, Context Menu and pop-up menu ).
Context Menu
The Context Menu provides operations on specific items or context frameworks on the UI interface, just like the context menu in Windows.
In
Create a custom notification Layout
By default, the notification displayed in the notification window includes the title and message text. The two items are defined using the contenttitle and contenttext parameters of the setlatesteventinfo () method. However, you can also use the remoteviews class to define a custom Layout for notifications. 3 is an example of custom notification layout. It looks similar to the default notification, but it is actuall
Install Ubuntu 3 on a hard disk in Windows-configure the android development environment and common settings in ubuntuRelated links:Install Ubuntu on a hard disk in Windows-install Ubuntu11.10http in XP: // www.bkjia.com/ OS /201205/130282.html;Ubuntu II for Windows hard drive-install Ubuntu11.10 for Win7 http://www.bkjia.com/os/201205/130285.html After ubuntu is installed, You need to configure the develop
color used by the control. The RGB naming method is used.
Android: layout_weight
The number of values indicates the number of values that the control occupies the entire screen. For example, there are two controls in the current Activity. The first control is android: layout_weight = "2 ", the second control is a
intersect, // The final region is the region XOR (3) in which region1 and region2 are combined ), // The final region is reverse_difference (4) outside the intersection of region1 and region2, // The final region is the region Replace (5) of region2 and region1 ); // The final region is region2}
Apidemo provides an example of the combination at the end.
Android also provides a regioniterator to iterate al
in the activity:Mimageview2.setimagebitmap (imagehelper.handlerimagenegative (bitmap));Photo-nostalgic effect processing:/** * Image processing as a nostalgic effect * * @param BM * @return */public static Bitmap Handlerimageoldphoto (Bitmap BM) {int width = Bm.getwid th (); int height = bm.getheight ();//Use an array of width times high to hold all pixels int[] Oldpx = new int[width * height];int[] newpx = new Int[width * Height];int Color;int R, G, B, A; Save the extracted component in color
After reading the previous books, I have a certain understanding of Linux kernel and Android. Do you want to compile your own Android source code? I am always used to using Windows, but Android source code does not support compiling on Windows. Therefore, I decided to use a virtual machine to install Ubuntu and then download, compile, and install
Win7 under Android development environment (updated 2015/3)--JDK + Eclipse + Android SDK + ADT installation, configurationAndroid development environment is not complex, is the resource is not good, this article for the current Win7 environment, based on the Jdk+eclipse+sdk+adt of the Android development environment bu
Basics of learning Android from 0 (3)-layout manager of view ComponentsAndroid layout managerAndroid ActivityThe component binds the display interface for the activity through setContentView (xml resId, however, in order to better manage the various controls in the user interface of the Android Application (a series of components such as button text box editing a
The sdk has been installed before. Although it only downloads the first 1.5, there is at least one sdk. The following will use a simulator to run the image file in the sdk.
Open the android virtual device manager tool and click new
After the configuration is completed, of course, only one api can be selected at present, so it is as follows:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/103SM219-0.png "title =" ttttt.png "/
system.
2. android: drawableTop = "@ drawable/tab_icon1" is the icon used to set the radio button (the system provides the icon on the left by default, which can be set on it)
3. android: drawablePadding = "3dp" is used to set the distance between the button icon and the button label.
Long time no update, the recent phone on the alarm clock app does not have a good, so want to write a.The Android development environment is set up, so be careful to install the JDK first.1. Install Android StudioGoogle's Android development site has a Chinese version, without crossing GFW to access: https://developer.android.google.cn/At first glance, it feels l
suitable to use InsetDrawable. For example, using this can solve the problem between our custom Dialog and the screen.I believe all the friends who have done this know that even if we set layout_margin, this is useless.You can use this InsetDrawable! You only need to set an insetXxx for InsetDrawable.Margin of the direction, and then set it to the background of the Dialog!
The related attributes are as follows:
1.
Drawable: The referenced Drawable. If it is null, there must be a Drawa
_ write_to_log_kernel.Look at the implementation of _ write_to_kernel (), which is basically a write operation:static int __write_to_log_kernel(log_id_t log_id, struct iovec *vec, size_t nr){ ssize_t ret; int log_fd; if (/*(int)log_id >= 0 */ (int)log_id To sum up, the println_native () operation is to open the device file (if it has not been opened) and then write data. But how to write it depends on the implementation of the logger driver of the log device.[This series of articles]In
this qualifier?
If no, the system returns Step 1 and continues to compare the next qualifier (in this example, the system returns to "no" until the language qualifier is compared ").
If "yes" is returned, proceed to step 4.
4. Remove the directories whose names do not contain this qualifier. In this example, the system will exclude all directories that do not contain the language qualifier:
Drawable/
Drawable-en/
Drawable-en-Port/
Drawable-en-notouch-12key/
Drawable-Port-ldpi/
Drawable-port-not
1. IntroductionThis analysis is a very simple program, is a primer on the introduction of anti-compilation tutorialMainly learn about the use of tools, the following is downloaded from the Internet test samplesTest Sample ex_05_01_.apkLink: http://pan.baidu.com/s/1sjOIXJn Password: 5uq42. First, use Dex2jar and Jd-gui to viewReference: Android Learning Tips (8)---Mac Dex2jar and Jd-gui use先提取apk中的classes.dex,使用dex2jar工具使用jd-gui打开classes_dex2jar.jar查看源
skins, We can beautify our UI. After beautifying the UI, we will attract more users. At least we will not make our apps look ugly (of course, we also need reasonable styles and skins, otherwise it may be more ugly ).
Style and skin can be used in the following scenarios:
1. Add an independent style to a widget
Define a style view sourceprint? 1
Then use the set style view sourceprint in the control of the layout file? 1
2
the android simulator. There is a script file build. Sh that is responsible for scheduling. All the examples in this book will have a build. Sh script file. to execute this script file, you need to ask the user to selectSource codeCompile to that platform and select 6-11 from the menu. You can enter 1, 2, or 3 to select the compilation platform. If you press the
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.