Cherish:Add keyguard weather style (2/2)
DennySPb: use listpreference Change-Id: I10c965a4a50d5c59f27c5019c3e0f1081734bf52 Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -439,4 +439,13 @@
|
|||||||
<item>1</item>
|
<item>1</item>
|
||||||
<item>2</item>
|
<item>2</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="lockscreen_weather_style_entries">
|
||||||
|
<item>@string/lockscreen_weather_omni_style_title</item>
|
||||||
|
<item>@string/lockscreen_weather_pixel_style_title</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="lockscreen_weather_style_values" translatable="false">
|
||||||
|
<item>0</item>
|
||||||
|
<item>1</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -537,4 +537,9 @@
|
|||||||
<string name="weather_icon_pack_title">Condition icon pack</string>
|
<string name="weather_icon_pack_title">Condition icon pack</string>
|
||||||
<string name="weather_icon_pack_note">Note\u003a you can install new icon packs from play store by searching for \"Chronus icons\"</string>
|
<string name="weather_icon_pack_note">Note\u003a you can install new icon packs from play store by searching for \"Chronus icons\"</string>
|
||||||
<string name="weather_icon_pack_info_title">Condition icon pack is used in quick settings and lock screen</string>
|
<string name="weather_icon_pack_info_title">Condition icon pack is used in quick settings and lock screen</string>
|
||||||
|
|
||||||
|
<!-- Lockscreen weather style -->
|
||||||
|
<string name="lockscreen_weather_style_title">Weather style</string>
|
||||||
|
<string name="lockscreen_weather_omni_style_title">Omni style</string>
|
||||||
|
<string name="lockscreen_weather_pixel_style_title">Pixel style</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -207,6 +207,16 @@
|
|||||||
android:summary="@string/lockscreen_weather_enabled_summary"
|
android:summary="@string/lockscreen_weather_enabled_summary"
|
||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||||
|
android:key="lockscreen_weather_style"
|
||||||
|
android:title="@string/lockscreen_weather_style_title"
|
||||||
|
android:dialogTitle="@string/lockscreen_weather_style_title"
|
||||||
|
android:entries="@array/lockscreen_weather_style_entries"
|
||||||
|
android:entryValues="@array/lockscreen_weather_style_values"
|
||||||
|
android:defaultValue="0"
|
||||||
|
android:dependency="lockscreen_weather_enabled"
|
||||||
|
android:summary="%s" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="omnijaws_settings"
|
android:key="omnijaws_settings"
|
||||||
android:icon="@drawable/ic_weather"
|
android:icon="@drawable/ic_weather"
|
||||||
|
|||||||
@@ -39,13 +39,15 @@ import com.android.settings.R;
|
|||||||
import com.android.settings.SettingsPreferenceFragment;
|
import com.android.settings.SettingsPreferenceFragment;
|
||||||
import com.android.settings.Utils;
|
import com.android.settings.Utils;
|
||||||
import com.android.settings.search.BaseSearchIndexProvider;
|
import com.android.settings.search.BaseSearchIndexProvider;
|
||||||
import com.android.settings.search.Indexable;
|
import com.android.settingslib.search.SearchIndexable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@SearchIndexable
|
||||||
public class OmniJawsSettings extends SettingsPreferenceFragment implements
|
public class OmniJawsSettings extends SettingsPreferenceFragment implements
|
||||||
Preference.OnPreferenceChangeListener, Indexable {
|
Preference.OnPreferenceChangeListener {
|
||||||
private static final String TAG = "OmniJawsSettings";
|
private static final String TAG = "OmniJawsSettings";
|
||||||
private static final String CATEGORY_WEATHER = "weather_category";
|
private static final String CATEGORY_WEATHER = "weather_category";
|
||||||
private static final String WEATHER_ICON_PACK = "weather_icon_pack";
|
private static final String WEATHER_ICON_PACK = "weather_icon_pack";
|
||||||
@@ -165,19 +167,15 @@ public class OmniJawsSettings extends SettingsPreferenceFragment implements
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||||
new BaseSearchIndexProvider() {
|
new BaseSearchIndexProvider() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
||||||
boolean enabled) {
|
Context context, boolean enabled) {
|
||||||
ArrayList<SearchIndexableResource> result =
|
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||||
new ArrayList<SearchIndexableResource>();
|
|
||||||
|
|
||||||
SearchIndexableResource sir = new SearchIndexableResource(context);
|
|
||||||
sir.xmlResId = R.xml.omnijaws_settings;
|
sir.xmlResId = R.xml.omnijaws_settings;
|
||||||
result.add(sir);
|
return Arrays.asList(sir);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user