Android AsyncTask user experience and error handling-UI components can only be changed in the main thread
You will always use the AsyncTask class frequently, especially in network processing. Check the corrected code first: this is the normal code:
Class sendKeyTask extends AsyncTask
{@ Overrideprotected void onPostExecute (Integer resultCode) {// TODO Auto-generated method stubsuper. onPostExecute (r
Overview:I think when we use some apps, there should be no "bare controls". Unless it is software in some system, it is to maintain the consistency of style, make some trade-offs. I'm not here to accuse Android native controls of not looking good, honestly, I like some native controls for Android. Just some time for the consistency of style, you have to spend some effort on the art. This in the art, I reall
component
Android:layout_alignbottom
Controls the bottom boundary of the end component from the ID specified component
Android:layout_alignleft
Controls the left edge of the component with the ID specified component
Android:layout_alignright
Controls the right edge of the component with the ID specified component
Android:layout_alignstart
Controls the starting position of the component aligned with the starting posi
Thanks to the
ViewStub is an invisible, lightweight View. It has no size, does not draw and participates in the layout in some form. This means that ViewStub's cost of inflate and retaining it at the View level is very low. The best description of ViewStub is "lazy include ". The layout referenced in ViewStub is displayed only when you want to add it to the UI.
The following comes from the Shelves application. In the figure, the Activity shows a list
Towering high-rise, the most intuitive person in the development of Android also believes that the most task is the development of the UI.So what do users see at the front desk?Yes, it's activity!.Activity is just a form, and what is actually shown to the user is view.If a person familiar with web development understands the concept of MVC. This view is the V-level, which shows the user what to see.Also used to interactively produce model data for the
ObjectiveThis is already an analysis of the Android UI drawing process of the fifth article of the series, no accident is also the last article. Again, this series of articles is my reading of the csdn Daniel Guo Lin's blog post, "Take you step-in-depth understanding of view" after the practice.In turn, we learned about the inflate process and the three steps to draw the view: measure, layout, draw. This ti
ObjectiveFollow the recent blog's route and continue to talk about Android UI development. Today, let's talk about Viewstub controls, lazy load controls. In this blog, you'll learn about common properties, methods, and considerations for viewstub. Finally, we will demonstrate the use of Viewstub with a simple demo.ViewstubBefore introducing Viewstub, you can look at the Viewstub, lazy load control. Viewstub
[Android UI] The action bar is dragged up or down with ScorllView, and the transparency gradient effect is displayed. androidactionbar
I have seen more and more applications use this effect, such as the main interface of QQ space 5.0. It looks really good! I searched for the relevant implementation methods and found that the related solutions have long been available:
Demo of transparency change of scrollin
Android UI development topic (3) Various Drawable
This section describes the various Drawable types on the Android platform. graphics. under the drawable package, we can see that there are more than a dozen Drawable classes. What are the relationships and differences between them?
I. AnimationDrawable
As the name suggests, this class mainly represents the anima
Introduction:
Summary of UI development materials on the android Interface
1. android_uidevelopment topic .rar2. android ..rar
For the Android platform's resource class android. content. res. resources may be unfamiliar to many netizens. Let's take a look at how the SDK
Most of the time you want to design a nice Android UI, the controls that you use with Android don't meet our needs. Consider customizing the control, display Class View in the Android interface, and implement our graph drawing by inheriting extension rewrite related methods.
First we need to understand the bottom of t
Most of the time you want to design a nice Android UI, the controls that you use with Android don't meet our needs. Consider customizing the control, display Class View in the Android interface, and implement our graph drawing by inheriting extension rewrite related methods.
First we need to understand the botto
layout of the grid to fill the background with the grid is the layout of the background color inconsistent, that is, the Mylayout.xml layout background and Activity_ The background color of the main.xml layout is inconsistent, and you also need to set the spacing between the grid and the grid so that the grid is detached.5, to achieve the selected (click) of the grid to render a different color, you need to know the clicked Grid item number, and call Myadapter.notifydatasetchanged () to update
the following method:
Android:textappearance= "? Android:attr/textappearancelarge" android:textappearance= "? android:attr/ Textappearancemedium "android:textappearance="? Android:attr/textappearancesmall "
Or
Style= "? Android:attr/textappearancelarge" style= "? Android:attr/textappearancemedium" style= "? android:attr/ Textappearancesmall "
⑤android:scrollhorizontally= "true": if the text exceeds the width of the TextView, the horizontal pull bar appears⑥android:autotext= "false": if set, the
Tabhost, watch out.1. Put the tabhost on the interface and add a custom tab, and you must also set the tab in code, not the XML.2.Activity must inherit tabactivity, otherwise there is no gettabhost function3. It is not recommended to use Tabactivity now, recommended with Flagment, it is said in the bookExampleThe first tab Landing window is in another activity, and the others are written in XML.Activity_main.xmlLinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/
In many cases, if you want to design a beautiful Android UI, you must consider the self-painted controls to display class views on the android interface, we can use the inheritance extension to override related methods to draw our graphics. First, we need to understand the underlying implementation of the View class. In the SDK, we can see that the view directly
LinearLayout of Android UI LayoutLinearLayout 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: orienta
Android UI: Tab interface summary, androidui
Reprinted please indicate the source: http://blog.csdn.net/crazy1235/article/details/42678877
It is very common to implement the Tab interface in the Android program, which is often used in projects. So I would like to summarize several methods to implement the tab interface for your reference. If anything is wrong, p
Problem:
Recently, I am working on a major software engineering job. I use spring MVC as the server and Android as the client.
Then the Tomcat server is enabled on the computer, and the android Virtual Machine Test client is used to find that the server can be connected, but the real machine test is still unable to connect.
Cause:
From Android 3, Google forces t
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.