Android form UI and event processing of corresponding controls, android form ui controls1. ToastToast is a lightweight reminder tool that displays a line of text to prompt responses to user operations. Usage: Toast. makeText (context, text, time ). show (); context: context, text: display text content, time: Display du
Android asynchronous mechanism 1: Use Thread + Handler to implement non-UI Thread update UI interface, androidui
Overview: Every Android application runs in a dalvik virtual machine process. When a process starts, a main thread (MainThread) is started. The main thread is responsible for processing
Android: an efficient UI is a popular UI (2). androidui
While the boss is not secretly leaving work early tonight, he has time to continue to talk about the pain of uidesign. This is also an example of the previous article "Android: an efficient UI is a great
Android updates the UI and androidui in non-UI threads
When updating the UI (Program Interface) in a non-UI thread, the following exception occurs:
So how can we refine the UI in a non-UI
extraordinary, and efficient UI interface is a very grey and awesome interface design.IntroducedIn Android applications, writing an interface in hard-coded ways is not a recommended approach. Of course, the hard-coded interface is more efficient and flexible than the XML-based soft-coded interface, but it's not easy to maintain, and the intricacies of the code will make the program bury the Thunder, and th
In Android development, non-UI threads cannot operate controls in the UI thread, that is, the UI is non-thread-safe.
As I said in the previous article:
It is non-UI secure, that is, it does not accept modification requests from non-UI
I. Problem Description
In general, when we play a video through a mobile player, the playback event is triggered through buttons on the UI. Surfaceview, the control for displaying video streams, refreshes the playback screen of each frame following the playback progress.
However, sometimes ...... We need to use the UI thread to replace the button event to control the video playback effect. What should we do
Android UI-re-paint EditText and implement gradient of Button, ui-edittext
In this article, we implement a common re-drawing of EditText and adding gradient to buttons or windows.
Because EditText is inherited from TextView, you can re-paint EditText. When re-painting, you only need to inherit EditText and override its onDraw () method.
When adding gradient to a
Article Description: Google Android UI design tips: A new UI design pattern.
This series of articles, originally an Android UI design slide from the official Android developer blog, was translated into 5 translations b
Android: an efficient UI is a popular UI (1)
Opening
Android is an operating system running on mobile terminals. The biggest difference with traditional PCs is the shortage of resources on mobile terminals, it should be described as "very" to be reliable. Therefore, it is often the case that some software is terminate
Android still successfully updated the UI on non-UI threads for in-depth analysis. androidui
"View can only be updated in the main UI thread".
Are you familiar with this sentence?
Come on, buddy. Let's look at the following example.
@ Override protected void onCreate (Bundle savedInstanceState) {super. onCreate (savedI
05 March 2009
Http://android-developers.blogspot.com/2009/03/window-backgrounds-ui-speed.html
Window backgrounds UI speed
Some Android applications require to squeeze every bit of performance out of the UI toolkit and there are always ways to do so. In this article, you wil
Android: an efficient UI is a popular UI (2)
In the previous blog, I explained two methods to optimize the UI design. The first one is to use as few components as possible to implement the layout function, the second is to use the
It's almost four years old and running the old an
Android updates the UI in a non-UI thread
When updating the UI (Program Interface) in a non-UI thread, the following exception occurs:
So how can we refine the UI in a non-UI thread?
T
The exception that appears when you update the UI (Program interface) in a non-UI thread is as follows:So how do you get a finer UI in a non-UI thread?There are many ways to do this, and here are two main types:The first type: Add looper.prepare () after the line of code that needs to update the
=NewMessage ();101 //mark the MSG (similar to--key--)102Msg.what = 0x123;103 //Create a bundle and store the data104Bundle bundle =NewBundle (); theBundle.putstring ("name", name);106Bundle.putstring ("Phone", phone);107 //Add data to msg108 Msg.setdata (bundle);109 //send a message to a new thread the updataThread.mhandler.sendMessage (msg);111 the //accept that the message returned by the child thread is the same as the usage of the child thread113Mai
Construct flexible UI Previous lesson Next lesson this lesson teaches you
Add Fragment to Activity at run time
Replace Fragment
You also need to read
Fragments
supports tablet and handheld devices
Try the Download sampleFragmentbasics.zipWhen you design your app to support a wide range of screen sizes, you can reuse your fragment in different layout configurations to optimize the user experience based on the availab
UI debugging when the programmer is a headache problem: sometimes 1DP, 2dp problems, get speechless (Android development deep Experience)Here is a common debugging tool in the actual development process, can be accurate to each view in the absolute position of the screen (accurate to the specific PX), with such a tool, you can well find the problem in the UI.In fact, in the Ddms view, use the Dump view
Android thread-communication between the UI thread and the non-UI threadAfter the main thread sendMessage, The subthread calls handleMessage to obtain the Message you sent. My main thread carries data when sending messages to the subthread. The subthread queries the database based on the data sent by the main thread and returns the query results to the main threa
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.