A lot of people have been asking me recently how to design the UI for a personal app developer.In fact, this is the most headache for the individual developers, technology people, really can not do everything, it is impossible to spend a lot of time to cut pictures, to do prototype design, to do art.Of course, although we can not design a complex, sophisticated UI, but the simple thing, we do not have the a
1. If power and flow are not taken into account, simply inherit the runnable in the corresponding activity, write a while loop inside the Run method, call the interface to return the data, and update the UI immediately if the data has changed2. Need to consider the power, is the remote server to send messages to the client, the client receives information, to send a broadcast, the corresponding activity received the broadcast to update the
August 6, 2014 11:06:44The use of Android to define its own label. Implement a flat UI design:Define your own label in the 1.attrs.xml fileSuch as:Reference refers to a quote from String.xml.Flag is custom, similar to android:gravity= "top"Dimension refers to the content that is quoted from the Dimension.xml.2. Use your own definition label in the layout file. Assigning values to tag propertiesSuch as:Com.e
(); } return Convertview;} Static class Viewholder { TextView text; ImageView icon;}3. Optimize the layout file, prevent the level nesting too deep, preferably not more than 5 layers(1) Tools to use the viewing layout: Hierarchy Viewer(2) Using the Layout optimization tool: layoutopt4. Optimize Activity Background MapFirst of all we need to know that in Android activity, there are not only the view that you use when you use Setcontentview
1. Basic ConceptsView: The parent of all visual controls, an object that the user can interact with on the Android app screen (for example, a button drop-down box text box, and so on).A subclass of Viewgroup:view that holds the layout container for view and ViewGroup objects (linear layout, relative layout, and so on).Simply understood, view is a variety of controls (buttons, text), and ViewGroup provides a variety of layout modes.Any component in the
Haven't written about UI for a long time, just turned over the previous blog, a recent blog about the UI: the Android UI Design series of the custom dialog implementation of various styles of dialog box effect (7), to achieve a variety of style effects of the dialog box, After that blog after writing because the compan
resources in the application can be directly used, specific, you can go to the corresponding folder in ANDROID-SDK to see. For example: can enter the $android-sdk$\platforms\android-8\data\res, inside of system resources is sweeping.Developers need to spend some time familiarizing themselves with these resources, especially the picture resources and various styl
The headline may sound a bit big, but it's mostly about the UI component of an application, whether it's full activity or full-fragment, or both, and some considerations for using activity and fragment.Activity or FragmentStarting with API 11,honeycomb, Google has added fragment, a lightweight, reusable, modular UI component to Android, and the official recommend
report such a mistakeJava.lang.IllegalStateException:The specified message Queue synchronization barrier token have not been posted or have ALR Eady been removed.Just say this message synchronization barrier token has been sent .But the problems in the project have not been solved, look back to find out the reasons and then sent upWe know that there are three types of ANR :1:keydispatchtimeout (5 seconds)-- main typeKey or touch events do not respond at a specific time2 : broadcasttimeout (se
When downloading files based on Android, update the simple help class of UI and androidui
Due to this simple requirement during project development, Google also has many Utils tool classes on the Internet, but they are relatively redundant. I wrote a simple help class.
/*** Download the file and update the simple UI help class ** @ author jarlen **/public class
Update the simple help class of the UI when downloading files based on Android
Due to this simple requirement during project development, Google also has many Utils tool classes on the Internet, but they are relatively redundant. I wrote a simple help class.
/*** Download the file and update the simple UI help class ** @ author jarlen **/public class DownLoadHel
)); } );Can ' t create handler inside thread that have not called looper.prepare ()Add loops or other threads.Looper.prepare (); New Handler (). Post (new Runnable () { @Override publicvoid run () { Textview.settext (string.valueof (i)); } ); Looper.loop ();Four: Go back to differentiate which thread to choose on:Private voidCallbackonw
instance ShowView Service = (ShowView) Context.getservice (ref); If (service! = null) { // Call service method Service.showview (Context.getbundle (), MYBTN, 0); release service, after which the service instance Context.ungetservice (ref) should not be used again ; } Summary: After the above steps, the plug-and-host view object passes and displays the process.In conjunction with OSGi services we define Java interface classes by ou
The sub-thread updates the UI.
Obviously, if your program needs to execute time-consuming operations, it would be wrong if the main thread is responsible for executing the operation as in the previous example. Therefore, we need to create a new sub-thread in the onclick method to call Google API to obtain weather data. The easiest way to think of Android Developers is as follows: Java code
Public void onc
Android UI layout: LinearLayout and linearlayoutLinearLayout is one of the most common layout s in Android. It lists its child elements in one direction. The direction can be either horizontal or vertical. In this direction, you can set android: orientation = "vertical" or android
Original link: http://www.orlion.ga/453/I. Units and dimensionsThere are altogether the following units in the layout file: px,pt,dp,spPX: is the smallest element unit in pixels that is visible in the screen.PT: Is a pound, 1 lbs equals 1/72 inches, the general PT will be used as the unit of the font.The same PX number of controls at different resolutions on the phone screen effect is different, PT and PX is the same situationDP: is a density-independent pixel, also known as a dip, that is consi
LinearLayout for Android UI
※※※※From http://www.cnblogs.com/salam/archive/2010/10/20/1856793.html
LinearLayout is a linear layout control. Its child controls are arranged horizontally or vertically, and all widgets or other containers are arranged according to their relative positions. When the boundary is exceeded, some controls will be missing or disappear. Therefore, each row in a vertical list only has
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.