Android Interface Design

Source: Internet
Author: User

WM = (WindowManager) getsystemservice (Context.window_service);
Displaymetrics dm = new Displaymetrics ();
Wm.getdefaultdisplay (). Getmetrics (DM); Put some information about the current window in the Displaymetrics class
float density = dm.density; Density px = DP * Density dp/px = density
int dpi = dm.densitydpi;
width = dm.widthpixels;
Height = dm.heightpixels;

PX = DP * Density dp/px = density

Focus: Android:focusable= "True" does not change Android:focusableintouchmode keyboard
Android:focusable= "false" will make android:focusableintouchmode= "false"
Android:focusableintouchmode= "false" does not affect android:focusable for touch screen
Android:focusableintouchmode= "true", it must be android:focusable= "true"

Font
English fonts use Roboto, Chinese fonts use Noto. Noto has 7 types of characters: Thin, light, Demilight, Regular, Medium, Bold and Black.
Text layout

Common Font Size:

12SP Small Print Tips
14SP (desktop 13SP) Body/Button text
16SP (desktop side 15sp) Small title
20SP AppBar Text
24SP Big Title
34SP/45SP/56SP/112SP Extra-Large text
The length of the text, each line suggested 60 characters (English) about. Short text, suggest about 30 characters per line (English).

Layout

All operable elements min. Click area Size: 48DP X 48DP.
The minimum unit for a grid system is 8DP, and all distances and dimensions should be multiples of 8DP. Here are some common dimensions and distances:
Top status bar Height: 24DP
AppBar min. Height: 56DP
Bottom navigation bar Height: 48DP
Suspension button Size: 56X56DP/40X40DP
User picture size: 64X64DP/40X40DP
Small icon Click Area: 48X48DP
Side drawer distance to the right of the screen: 56DP
Card pitch: 8DP
Separator line up and down white: 8DP
White space for most elements: 16DP
Screen left to baseline line: 16DP
Text left to baseline line: 72DP

tab is used only to show different types of content and cannot be used as a navigation menu. tab at least 2 items, up to 6 items.
The underline height of the tab check is 2DP

Android Interface Design

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.