mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
add dark theme to PassphraseChangeActivity
also adding DynamicLanguage to fix ActionBar language changes
This commit is contained in:
parent
0d06e78d25
commit
245c0adeea
5 changed files with 23 additions and 4 deletions
|
@ -3,8 +3,7 @@
|
|||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="@drawable/background_pattern_repeat">
|
||||
android:fillViewport="true">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="fill_parent"
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
<attr name="encrypted_backup" format="reference" />
|
||||
<attr name="plaintext_backup" format="reference" />
|
||||
|
||||
<attr name="registration_text_shadow_color" format="color" />
|
||||
|
||||
<attr name="reminder_header_background" format="color"/>
|
||||
|
||||
<attr name="menu_new_conversation_icon" format="reference" />
|
||||
|
|
|
@ -122,11 +122,11 @@
|
|||
<item name="android:textSize">12.0sp</item>
|
||||
<item name="android:typeface">sans</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textColor">#ff808080</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
<item name="android:gravity">left</item>
|
||||
<item name="android:layout_gravity">left</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:shadowColor">#ffffff</item>
|
||||
<item name="android:shadowColor">?registration_text_shadow_color</item>
|
||||
<item name="android:shadowDx">1.0</item>
|
||||
<item name="android:shadowDy">1.0</item>
|
||||
<item name="android:shadowRadius">0.0</item>
|
||||
|
|
|
@ -181,6 +181,8 @@
|
|||
<item name="conversation_icon_attach_audio">@drawable/ic_audio_light</item>
|
||||
<item name="conversation_icon_attach_video">@drawable/ic_video_light</item>
|
||||
|
||||
<item name="registration_text_shadow_color">@color/gray95</item>
|
||||
|
||||
<item name="reminder_header_background">#ff1d85d7</item>
|
||||
|
||||
<item name="pref_ic_sms_mms">@drawable/ic_textsms_black_32dp</item>
|
||||
|
@ -294,6 +296,8 @@
|
|||
<item name="conversation_icon_attach_audio">@drawable/ic_audio_dark</item>
|
||||
<item name="conversation_icon_attach_video">@drawable/ic_video_dark</item>
|
||||
|
||||
<item name="registration_text_shadow_color">@color/gray13</item>
|
||||
|
||||
<item name="reminder_header_background">@color/textsecure_primary_dark</item>
|
||||
|
||||
<item name="pref_ic_sms_mms">@drawable/ic_textsms_grey_32dp</item>
|
||||
|
|
|
@ -31,6 +31,8 @@ import android.widget.Toast;
|
|||
import org.thoughtcrime.securesms.crypto.InvalidPassphraseException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
/**
|
||||
|
@ -41,6 +43,9 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|||
|
||||
public class PassphraseChangeActivity extends PassphraseActivity {
|
||||
|
||||
private DynamicTheme dynamicTheme = new DynamicTheme();
|
||||
private DynamicLanguage dynamicLanguage = new DynamicLanguage();
|
||||
|
||||
private EditText originalPassphrase;
|
||||
private EditText newPassphrase;
|
||||
private EditText repeatPassphrase;
|
||||
|
@ -50,6 +55,8 @@ public class PassphraseChangeActivity extends PassphraseActivity {
|
|||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
dynamicTheme.onCreate(this);
|
||||
dynamicLanguage.onCreate(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.change_passphrase_activity);
|
||||
|
@ -57,6 +64,13 @@ public class PassphraseChangeActivity extends PassphraseActivity {
|
|||
initializeResources();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
dynamicTheme.onResume(this);
|
||||
dynamicLanguage.onResume(this);
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
this.originalPassphraseLabel = (TextView) findViewById(R.id.old_passphrase_label);
|
||||
this.originalPassphrase = (EditText) findViewById(R.id.old_passphrase );
|
||||
|
|
Loading…
Reference in a new issue