Saturday, February 22, 2014

Why not create a system preference_headers3.0


I are new preference, there is now a problem. That is, when you create xml layout files, find and do not have this optional layout file. Below




In the Internet that is 3.0 as the dividing line, the system will support more than 3.0 but I tune into the build environment above 3.0, and it targets AVD or 4.0. But still no xml file that can be created. . . . .

Figure


Questions:
1, Why can not I create a android3.0?
2, I was not android3.0 it?
3, although similar functionality and embedded old version , but do not know the difference between them, the good structure.


If your application supports both versions below 3.0, it supports 3.0 or later, or 3.0 above we use headers to provide dual-panel layout. Lower than version 3.0 we can add additional preferences XML is not in use, but rather to use node
it. But every sends an intent to PreferenceActivity. For example let's look at the next version of the code in Listing 3.0 or 5-13 or (res / xml / preference_headers.xml):

android: fragment = "com.example.prefs.SettingsFragmentOne"
android: title = "@ string / prefs_category_one"
android: summary = "@ string / prefs_summ_category_one" />
android: fragment = "com.example.prefs.SettingsFragmentTwo"
android: title = "@ string / prefs_category_two"
android: summary = "@ string / prefs_summ_category_two" />

Then let us look at the next version of the code listing below 3.0 5-14 (res / xml / preference_headers_legacy.xml):

android: title = "@ string / prefs_category_one"
android: summary = "@ string / prefs_summ_category_one">
android: targetPackage = "com.example.prefs"
android: targetClass = "com.example.prefs.SettingsActivity"
android: action = "com.example.prefs.PREFS_ONE" />

android: title = "@ string / prefs_category_two"
android: summary = "@ string / prefs_summ_category_two">
android: targetPackage = "com.example.prefs"
android: targetClass = "com.example.prefs.SettingsActivity"
android: action = "com.example.prefs.PREFS_TWO" />



Experienced people want to talk about <-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
How to run 3.0 on 4.0 virtual machine
Reply:
cited a floor knxw0001 reply:
how to run

3.0 on a 4.0 virtual machine
Should be backward compatible with the. . . 3.0 compiler environment and is carried out, which is not related to the virtual machine. .

No comments:

Post a Comment