This article summed up the andriod development of common problems, for everyone to learn, the specific content as follows
problems with referencing layouts in layouts in 1.Andriod (You can use the following methods to save resources by referencing the layout in a layout)
<LinearLayout>
<include layout= "@layout/buttom" >
</LinearLayout>
2. How to determine if your mobile phone version is not more than 4.0
if (android.os.build.version.sdk_int>10)
3. Screen switching issues and activity restart issues
Add in required activity
android:screenorientation= "Portrait"//Screen can only be displayed on the vertical screen
android:configchanges= "keyboardhidden|orientation"// Ensure activity does not restart when screen switch
4. Remove the APK head method
this.requestwindowfeature (window.feature_no_title);
add directly to Super.oncreate (Savedinstancestate);
How to call the Setup interface of mobile phone system in 5.Andriod
Intent mintent = new Intent ();
ComponentName comp = new ComponentName ("Com.android.settings",
"com.android.settings.WirelessSettings");
Mintent.setcomponent (comp);
Mintent.setaction ("Android.intent.action.VIEW");
StartActivity (mintent);
6.Eclispe method of introducing third party package
associate with current project only: Right-click->properties->andriod on Current project, add a project to add, then apply
7.
convert int to String type
string.valueof (int)
to convert a string to an int
iterger.parseint (str)
These are the common problems in andriod development and hope to help you learn about Android software programming.