The problem first appeared in a, problem analysis, entrance activity to load the default style black background theme color, to the implementation of the oncreate UI, leading to first see a short black. Two, the solution only need to modify the portal style Activity can, the code is as follows @android:style/Theme.Translucent "PS" android:theme=: some people may set the style is NoTitleBarandroid:theme=...
According to the coordinates to find details, as follows: request address: latlng=40.714224? -73.961452&sensor=true, http://maps.google.com/maps/api/geocode/json attention to the coordinates (latitude, and then longitude) do not pass the back. At this point there are 2 issues: 1, read the JSON is very slow; 2, return to the address information is in English, sometimes the page directly to the Chinese, the simulator is in English, the request address is amended as follows, can quickly return to the address information. 1, the request address...
Library Android import studio eclipse...
Eclipse project to Studio Android error. ...
Ctrl+C replication
Ctrl+X shear
Ctrl+V paste
Ctrl+Z undo
Ctrl+Y recovery
Select Ctrl+A
Ctrl+F key search dialog box to start
Ctrl+H find / Replace dialog box
Ctrl+D copy and paste here
Ctrl+L delete the current line
Ctrl+T when moving up a line
F3 to find the next
Shift+F3 search on a
Ctrl+Shift+F combination to find in the file
Ctrl+F3 search (volatil)...
Some special properties of GridView: the number of columns in the 1.android:numColumns= "auto_fit" //GridView is set to automatic.
2.android:columnWidth= 90dp "/ /, the width of each column, also is the item width, according to the displayed the most number of scaled to equal (the width of each item are the same) this attribute is proposed, to try and use well will save a lot of code.
ColumnWidth "3.android:stretchMode="...
Objective code generation control, sometimes view of padding and margin, drawablRight, background selector for colors, fonts, background color selector and some properties may set and layout XML file is not the same, pay attention to the detail, I compiled some, netizens often appear in the set. 1, code generation textView TextViewTextView = TextView new (this);
TextView.setText (mStrs[i]);...
Background selector is recently used to set CheckBox, and some other control, the background selector failure, you can use the following 2 methods, can generally be resolved. Preparation: create a color background selector in the res->color folder, named: text_black2white, black to white change.
Xmlns:android= http://schemas.android "<selector...
Android principle - do not need too much remaining memory does not need to care about the size of the remaining memory. In fact, a lot of people are the use of other system used to take over to the. Android is mostly used no exit design actually makes sense, the system of process scheduling mechanism has a relationship. If you know Java, you can more clearly the mechanism the. In fact, and the Java garbage collection mechanism similar, the system has a rule to reclaim memory. Memory scheduling has a threshold just below the value system will according to a list to close what users do not need to. Of course, this value defaults is very small.
CSDN-markdown editor syntax - font, font size and color...
Custom attributes in Android custom View (using attrs.xml, TypedArray)...
EventBus, to solve the interaction between fragment and activity. The main function is to replace the Intent, Handler, BroadCast, Fragment, Activity, Service, thread passing messages between the advantages of small overhead, the code is more elegant. And decoupling the sender and receiver. ...
Before using someone else's ListView, always can not meet the needs of the project, so I have to study the custom listview, and share it, easy to understand. ...
GridView nested GridView, and the internal GridView does not show the end, but also sliding, external can also slide, to solve the problem of sliding conflict. ...
Prior to the project as a need, to write a QQ as the same as the slide to delete, they want to find out the Android comes with control HorizontalScrollView, you can achieve, it should be the most simple method. Words not to say, directly on the code:
Android:layout_width= "fill_parent"
Android:layout_height= "fill_parent"
Android:backgro...