[Android] Sina oauth, progress bar, animationdrawable, toast, Android pre-defined Style

Source: Internet
Author: User
Tags oauth

Use Sina oauth:

Http://www.cnblogs.com/liangxing/archive/2010/10/19/1855938.html

The application for appid is very easy to use. The official SDK contains two projects, one is the source file and the other is the demo.

After filling in the token and secret, callback_url can fill in your blog and the demo will be ready for use.

Note: In Demo, right-click -- Property -- Android -- add .. \ com_weibo_android in the library below.

 

Progress bar: Android loading effect

Loading Effect of Android Market

Http://lishuaishuai.iteye.com/blog/1118969

Ideas:

Http://www.eoeandroid.com/thread-994-1-1.html

In my experiment, you can set setvisible (visible) in Init () to invisible in refresh (), and submit the intermediate process to mainservice in the background to enable a new thread, elegant.

Note: <include> the progress_bar defined in Main. XML, for example <IncludeAndroid: Id = "@ + ID/Progress_loading"Layout =" @ layout/progressbar ">

 

Animationdrawable frame-by-frame animation (defined for each frame) and compensation animation (defined for the first and last frames, calculated by the system in the middle)

Http://hi.baidu.com/lphack/item/e3c182ee316871225a2d64d4

Http://wangstar.iteye.com/blog/409115

Http://wiki.eoeandroid.com/Drawable_Animation

In combination, the software launch page works well.

Defines a compensation animation, listens to the start and end events of the animation, and acts as the start and end actions of the animation. Animdrawable. Start ();

 

Toast

Tips

 

Android pre-defined style:

Http://ithinkfeed.iteye.com/blog/837982

Font Size

For controls that can display text (such as textview edittext radiobutton button checkbox chronometer), you sometimes need to control the font size. The Android platform defines three font sizes.

"? Android: ATTR/textappearancelarge"

"? Android: ATTR/textappearancemedium"

"? Android: ATTR/textappearancesmall"

Usage:

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"

Font color

Android: textcolor = "? Android: ATTR/textcolorprimary"
Android: textcolor = "? Android: ATTR/textcolorsecondary"
Android: textcolor = "? Android: ATTR/textcolortertiary"
Android: textcolor = "? Android: ATTR/textcolorprimaryinverse"
Android: textcolor = "? Android: ATTR/textcolorsecondaryinverse"

Progressbar

Style = "? Android: ATTR/progressbarstylehorizontal"
Style = "? Android: ATTR/progressbarstylelarge"
Style = "? Android: ATTR/progressbarstylesmall"
Style = "? Android: ATTR/progressbarstylesmalltitle"

Delimiter

Horizontal:

<View Android: layout_width = "fill_parent"
Android: layout_height = "1dip"
Android: Background = "? Android: ATTR/listdivider "/>

Vertical:

<View Android: layout_width = "1dip"
Android: layout_height = "fill_parent"
Android: Background = "? Android: ATTR/listdivider "/>

Checkbox

Style = "? Android: ATTR/starstyle"

Textview similar to the title bar Effect

Style = "? Android: ATTR/listseparatortextviewstyle"

Other useful styles

Android: layout_height = "? Android: ATTR/listpreferreditemheight"

Android: paddingright = "? Android: ATTR/scrollbarsize"

Style = "? Android: ATTR/windowtitlebackgroundstyle"

Style = "? Android: ATTR/windowtitlestyle"

Android: layout_height = "? Android: ATTR/windowtitlesize"

Android: Background = "? Android: ATTR/windowbackground"

For more details, see the R. ATTR class in the SDK documentation.

Load the view of <include> In mainactivity,ViewProgress_bar = This. findviewbyid (R. Id.Progress_loading);

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.