New Android UI Instance Daquan---directory (continuous update)

Source: Internet
Author: User

New Android UI component instance Daquan---directory

--Reprint please indicate source: Coder-pig, welcome reprint, do not use for commercial use!



Piglet Android Development Exchange Group has been established, welcome everyone to join, both novice, rookie, Big God can, piglet a person's

Strength is limited after all, the writing out of things will certainly have a lot of flaws, welcome to point out, brainstorm, let the pig's blog

More detailed, help more people, O (∩_∩) o Thank you!

Piglet Android Development Exchange Group: Piglet Android Development Exchange Group Group number: 421858269

Paste the address of Google's official documents: https://developer.android.com/guide/topics/ui/index.html

If you can't access Google, you can download the Hosts file in the group and copy the contents to the local hosts.

In addition, some pages cannot be accessed and can be added before the URL: https://can be accessed !

Local HOSTS path: C:\Windows\System32\drivers\etc\HOSTS



This article outlines:

I believe a lot of friends have read a column I wrote earlier: "Android-ui component Instance Encyclopedia", which is written in

Some of the commonly used Android UI components to parse, some readers said to be taken as a document to see, the author is the same, the actual use of

Time to check the blog, UI component instance is a year ago just learned to write when the Android, there must be a lot of shortcomings, while resigning

, there is a period of free time, on the re-production of their own blog to organize and update , every day will persist in updating, save this directory

Can! I believe it will bring convenience to your development, well, enter a new chapter!




I. Pre-knowledge:

① screen resolution, screen size, pixel, DPI concept resolution

② get screen resolution, pixel, DPI method

PX,DP,SP,PT Analysis and conversion of ③ common measurement units




two. Common Properties of view:

①gravity and Layout_gravity attribute parsing

② to set the visible and invisible view

③ set view to be available for unavailable

④ Magical View Keepscreenon properties keep the screen solid




three. Six basic layouts:

①linearlayout: Linear layout

②relativelayout: Relative layout

③tablelayout: Table layout

④framelayout: Frame Layout

⑤absolutelayout: Absolute Layout

⑥gridlayout: Grid Layout

⑦java code Dynamically loading layouts


PS: Because of the Android fragmentation problem, we usually use the Relativelayout + linearlayout Weight (weight) attribute to

Resolving layouts self-adapting problem; Of course, we may also write a layout file for individual resolution phones in individual cases!




four. textview--text Box

① setting font style: bold, italic, underline

② to set text with HTML (display text in HTML)

③ set multi-line display with one line display not finished omitting

④ Magical Drawablexxx Set the TextView with pictures

⑤ Setting the shadow Effect of text

⑥ set TextView with border (rectangle, fillet, ellipse)

⑦textview Click events in response to partial text

⑧ Magical Setcompounddrawable Method set up four kinds of surround picture

⑨ set word spacing and line spacing



... Cond







New Android UI Instance Daquan---directory (continuous update)

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.