mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
parent
d36d33f837
commit
224b06f05a
@ -96,4 +96,6 @@
|
||||
<attr name="pref_ic_appearance" format="reference" />
|
||||
<attr name="pref_ic_storage" format="reference" />
|
||||
<attr name="pref_ic_advanced" format="reference" />
|
||||
|
||||
<attr name="app_protect_timeout_picker_color" format="reference"/>
|
||||
</resources>
|
||||
|
@ -103,6 +103,8 @@
|
||||
<item name="pref_ic_appearance">@drawable/ic_brightness_6_black</item>
|
||||
<item name="pref_ic_storage">@drawable/ic_delete_black</item>
|
||||
<item name="pref_ic_advanced">@drawable/ic_advanced_black</item>
|
||||
|
||||
<item name="app_protect_timeout_picker_color">@style/BetterPickersDialogFragment.Light</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkTheme" parent="@style/Theme.AppCompat">
|
||||
@ -200,6 +202,8 @@
|
||||
<item name="pref_ic_appearance">@drawable/ic_brightness_6_gray</item>
|
||||
<item name="pref_ic_storage">@drawable/ic_delete_gray</item>
|
||||
<item name="pref_ic_advanced">@drawable/ic_advanced_gray</item>
|
||||
|
||||
<item name="app_protect_timeout_picker_color">@style/BetterPickersDialogFragment</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.Light.Dialog"
|
||||
|
@ -4,6 +4,7 @@ import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.TypedArray;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
@ -91,10 +92,16 @@ public class AppProtectionPreferenceFragment extends PreferenceFragment {
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
int[] attributes = {R.attr.app_protect_timeout_picker_color};
|
||||
TypedArray hmsStyle = getActivity().obtainStyledAttributes(attributes);
|
||||
|
||||
new HmsPickerBuilder().setFragmentManager(getFragmentManager())
|
||||
.setStyleResId(R.style.BetterPickersDialogFragment_Light)
|
||||
.setStyleResId(hmsStyle.getResourceId(0, R.style.BetterPickersDialogFragment_Light))
|
||||
.addHmsPickerDialogHandler(this)
|
||||
.show();
|
||||
|
||||
hmsStyle.recycle();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user