Recently in doing Android development, just getting started, encountered a lot of problems, accumulated the habit of doing refactoring, encountered problems, a good solution, a good summary, and then sorted as follows:
One. Eclipse Error1. ' Missing contentdescription attribute on image ' in XMLreason: Missing a picture description, this warning will be thrown at the beginning of ADT 16 to ensure that the
Original Problem description: I want to display image thumbnails In the view of the gridview, requiring these images to be displayed in horizontal scroll bars in a column. I have set many parameters, but I can't check for any errors. The displayed image is not displayed as intended. Solution: [java] import android. app
After the android image is renamed and set as a contact, the system prompts that the image cannot be loaded,Rename an image -- rename the image as a contact icon -- rename it with the same ima
Set an avatar for Android, take a photo on your phone, or select an image from a local album as the Avatar.??
[Set an avatar for Android, take a photo on your mobile phone, or select an image as an Avatar from a local album]
Socia
1. No, no, how to see the Imageview.setalpha (INT) in the "Related XML Properties" section is missing another method is View.setalpha (floating)/android:alpha instead. However, only because API level 11 is the latter.2. It is easier than other reactions. There is an XML value alpha that requires double value. The invisible Android:alpha="0.0" Android:alpha="0.5" perspective Android:alpha="1.0" is all visibl
theXmlresourceparseropenxmlresourceparser (String fileName)Way to getLayoutfilethroughSetcontentview (view)set to the entireActivitythe layout using the controls in them(Buttontextviewwait)whencan still be passedr.id.xxthe way to getat this point by parsingXMLfile, system and get to you thisXMlin each controlId(In this caseIdwhether it will be associated with third-party resourcesIdConflictI don't think this is going to happen, after all.Findviewbyid
theXmlresourceparseropenxmlresourceparser (String fileName)Way to getLayoutfilethroughSetcontentview (view)set to the entireActivitythe layout controls in use(Buttontextviewwait)whencan still be passedr.id.xxthe way to getat this point by parsingXMLfile, system and get to you thisXMlin each controlId(In this caseIdwhether it will be associated with third-party resourcesIdConflictThis question I think will not happen after allFindviewbyid ()the defini
For example, the Login program of Android and the Helloworld program of Android cannot run a correct program correctly. It has been depressing for a long time, finally, after a test, the program of the self-built project was successfully run in the Android simulator. The following is a summary of the procedure startup interface settings:
In the
I collected a bunch of Android code from the Internet, such as the login program of Android and the helloworld program of Android, but I still cannot run a correct program correctly. I 've been depressed for a long time, finally, after a test, the program of the self-built project was successfully run in the android si
two types of screen conversion Animation:
1. TranslateAnimation Effect
2. RotateAnimation effects of screen transfer and Rotation
InResCreate a folderAnimAnd createAnimation. xmlFile:
Encoding = "UTF-8"?>
Xmlns: Android = "http://schemas.android.com/apk/res/android">
Android: fromxdelta = "0"//When the animation is set
Today, I checked the usage of tabactivity. The articles on the Internet are not comprehensive and are not detailed enough. Therefore, the entire code is specially organized for your convenience. I wrote the source code for Android for the first time. If you do not have any deficiencies, please kindly advise me ~ If you have less time to talk about it, go to the topic below.
My development environment is eclipse +
Note: This article is written by Colin, all rights Reserved! Reprint please specify the original address, thank you for your cooperation!In the development of Android, we often need to set a background for the program, but because of the size of the current Android device, if you arbitrarily set a picture as the backgr
This paper illustrates the gallery image set browsing implementation method of Android programming sliding effect. Share to everyone for your reference, specific as follows:
The Android system comes with a gallery view of the application of the image, with a very smooth dis
1: Create an xml file tool_bar_bg_repeat.xml under the res/drawable file. For example:
Android: src = "@ drawable/tool_bar_bg_repeat" specifies the image to be tiled as tool_bar_bg_repeat.
Android: tileMode = "repeat" specifies that the tile mode is horizontal and vertical.
2: reference this file
The Android system comes with a gallery image browsing application that allows you to smoothly display images when dragging your fingers. This provides excellent user interaction and experience.
This example uses gallery and custom view to simulate the Image Browsing effect of a gallery image
Create a duplicate background pictureCreating a REPEAT_BG.XML:SRC in the drawable directory is the name of the reference picture
1
xmlversion="1.0"encoding="utf-8"?>
2
bitmapxmlns:android="http://schemas.android.com/apk/res/android"
3
android:src="@drawable/bg"
4
android:tileMode="repeat"/>
This can then be referenced in t
The Android system comes with a gallery view of the application of the image, with a very smooth display of pictures when dragged through the fingers, with good user interaction and experience.
This example uses gallery and custom view to simulate the image browsing effect of a gallery image
In Android L, XXRadius is used to set the rounded corner. The background image cannot be displayed,
Example of setting the control's background:
Summary:(1) the shape contains XXRadius, which cannot be displayed under Android L.(2) The selector contains XXRadius, which can be normally displayed under
Recently, we have cut the image and set the background color to transparent in developing spliced images. Here we will share the implementation method.
First, to ensure that the color is transparent after being removed, the image quality must be config. argb_4444 or config. argb_8888. Use the following methods to convert the resource map:
bmp = bmp.copy(Bitmap.Co
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.