example, on a WVGA precision screen, if the program does not support such a large screen, the system will say that it is a 320 × 480 screen, and the excess display area will be filled with black.But in order to achieve the best display effect, the best way is to design multiple sets of images. Then it is necessary to classify all screens based on their precision values (high and low), and then design three icons:First, design an icon for the mainstre
Android hides the app icon and android hides the app
In the past, I had nothing to worry about. I browsed my blog and saw the article that opened the app with a browser address,After trying as described in this article, I found that the app icon was not displayed on the desktop.You only need to modify it in the follo
1. Get the Android screen sizeWe can get the screen size through the GetSize () methodnew Point();display.getSize(size);int width = size.x;int height = size.y;Suppose it's not in the activity. You cannot use Getwindowmanager (). At this point, you can use Window_service to get a default displayWindowManager wm = (WindowManager) context.getSystemService(Context.WI
Android-Icon navigation in the Operation bar, android-Navigation
To enable the icon navigation up, take two steps:
1. Change the style --> the icon must be a clickable button with a left arrow.
2. Implement functions --> implement up navigation
First, let's talk about th
Reference Original: http://blog.csdn.net/wpwbb510582246/article/details/52556753Method One: Replace the ic_launcher-web.png picture file under the Res folderMethod Two:1. Click the Androidmanifest.xml file under the project folder2. Click the application option3, click Browse on the icon line, pop up the following dialog box4, click Creat New Icon, pop up the following dialog box5. Then click Next to popup
1. Get the screen size of the current device
Displaymetrics displaymetrics = new Displaymetrics ();
This.getwindowmanager (). Getdefaultdisplay (). Getmetrics (Displaymetrics);
2. Calculate the aspect ratio of the screen size set at the time of your development (this assumes that the screen size you set for development is 480*)
int screenwidth
Android newest mobile phone internal storage size, SD card storage size Method
We used to obtain this information in the past.
// Before Android API18: fs. getAvailableBlocks () * fs. getBlockSize ()
Currently:
/** Obtain available system memory **/@ SuppressLint ("NewApi") private String getMemFree () {S
This article is translated from the Android Developers blog Making Beautiful Android App Icons , the original author is +roman Nurik .for the average user, the main screen icon/launcher icon (the general abbreviation app icon) is the first impression that the app gives them.
Android obtains the total capacity of the SD card, available size, total body memory capacity and available size, and androidsd
Public long getSDTotalSize () {/* get the memory card path */File sdcardDir = Environment. getExternalStorageDirectory ();/* StatFs View File System space usage */StatFs statFs = new StatFs (sdcardDir. getPath (); long blockSize = statFs
This article describes the Android implementation to obtain the total capacity of SD card, available size, total memory capacity of the fuselage and the available size of the method. Share to everyone for your reference, specific as follows:
Maybe some students do not know that the system has been provided to obtain the total capacity of SD card, available
Android custom TextView automatically adjusts the font size of text content to adapt to the TextView size. androidtextview
Show the contact name of the address book on the small screen recently -- the length exceeds the boundary font and becomes smaller
/*** Custom TextView. The text content automatically adjusts the font siz
Overview1. Overviewlearn Android without imitating the interface of a variety of apps, since the advent of micro-letter 6.0, I think the micro-letter switch when the color of the tab icon Cock Cock, today I took you to customize the control, take you change color become fly ~ ~OK, let's look at the effect chart:
Clarity is not very good, we do see ~ ~ There are wood feel this weak burst of color,,, I mov
The Android app icon should be an Alpha channel transparent 32-bit PNG image. Due to the large number of Android devices, an application icon needs to be designed in several different sizes, such as:LDPI (Low Density screen,120 DPI) with an icon
desired height to reduce the image to px* @param aimsize image compression target size, in kilobytes*/public static Bitmap Comp (Bitmap image, float aimwidth, float aimheight,int aimsize) {Bytearrayoutputstream BAOs = new Bytearrayoutputstream ();Image.compress (Bitmap.CompressFormat.JPEG, BAOs);if (Baos.tobytearray () length/1024) > 1024) {//Determine if the picture is greater than 1M, if it is, compress it to avoid creating the picture ()Baos.reset
Android icon Specification
1. launcher application icon:
1.1, Icon size (48 * 48dp ):
Considering the device density, it usually requires three sets of icons with a pixel ratio:
Drawable-hdpi (48*1.5) * (48*1.5) pixels(1.5 indicates the pixel density of the device)
Drawable
EditText. It's just that we should include the full package name when we call layout the layout file, as follows:
Attach the actual effect chart:
Careful observation shows that the empty icon for the first input box leans to the left, because I added the android:paddingright= "10DP" line of code to the first input box's XML layout file. So, for the location of the empty icon, We can make speci
Android icon vs logo
The Android configuration file has two attributes: icon and logo. What are the differences between these two attributes?
Description of the icon attribute of the activity in the list file:
Android:
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.