Sina Weibo open platform development-android client (3)

Source: Internet
Author: User
Tags oauth
I am not too busy recently. I spent some time learning about android application development. After two weeks of study, I also wrote a lot of demo examples, which can be pushed to the demo set of basic Controls and Basic animation effects for continuous update and download.
I am not too busy recently. I spent some time learning about android application development. After two weeks of study, I also wrote a lot of demo examples, which can be pushed to the demo set of basic Controls and Basic animation effects for continuous update and download.
Starting from this week, we are going to take the Sina Weibo open platform as an example to develop an android client with simple functions, which will improve functions as much as possible.
Today's content

Is the main interface of this client. Features added today.
  • Simple style and skin, just adding a button.
The running system is android2.2.
The technical points used include ListView, custom ListAdapter, Message related to multithreading, Handler, OAuth related to verification, and asynchronous loading of user images.
Sina Weibo uses the OAuth component of signpost and does not use the Weibo SDK.

Download source code:



After downloading the source code, change the suffix to rar and decompress it with the compression software.
Style and Themey Style and skin

Through styles and 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
  • Then, use style = "" in the control of the layout file to set the style.

2. add the same style to several controls
  • Define a style
  • Style = "" is used to set styles in several controls.
3. there are two ways to modify the style of controls of the same type, such as the style of all buttons.
  • Method 1: define a style and apply the style to the style attribute in each button.
  • Method 2: defined as skin, and then applied to application or activity in the manifest file.
Obviously, the second advantage is to modify the style, or even the style name. you only need to modify the style definition. you do not need to modify the style anywhere. In the second method, the application scope of the style is an activity or the entire application. if you want to control several buttons, you can only use the first method.
Notes
For text purposes, define a style.
If you want to use the control, you need to inherit a style of the base class and modify it yourself. Otherwise, the control will only have the style you defined, and none of the others will be available, you can even click a button because the style definition is incomplete. To ensure the definition is complete, you need to inherit the control style of the system and then make your own modifications.
@ Style/Button The buttonStyle in indicates that the style or skin is applied to all buttons. Each control has these styles, such as listViewStyle and textViewStyle. You can search in the skin that comes with the system. In addition, style and skin usage and built-in style are good learning resources.
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.