Fixes Issue#1088

This commit is contained in:
Ishan Khanna 2015-03-04 02:36:33 +05:30
parent 3dda761791
commit eedc7064b9
2 changed files with 42 additions and 0 deletions

View File

@ -19,7 +19,10 @@ package org.sufficientlysecure.keychain.ui;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View; import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
@ -55,6 +58,7 @@ public class CertifyFingerprintActivity extends BaseActivity {
@Override @Override
protected void initLayout() { protected void initLayout() {
setContentView(R.layout.certify_fingerprint_activity); setContentView(R.layout.certify_fingerprint_activity);
changeToolbarColor();
} }
private void startFragment(Bundle savedInstanceState, Uri dataUri) { private void startFragment(Bundle savedInstanceState, Uri dataUri) {
@ -77,4 +81,21 @@ public class CertifyFingerprintActivity extends BaseActivity {
getSupportFragmentManager().executePendingTransactions(); getSupportFragmentManager().executePendingTransactions();
} }
/**
* Changes the color of our ToolBar.
*
* Currently Set to ORANGE
*/
private void changeToolbarColor() {
RelativeLayout mToolBarInclude = (RelativeLayout) findViewById(R.id.toolbar_include);
// Changes the color of the Status Bar strip
ImageView mStatusBar = (ImageView) mToolBarInclude.findViewById(R.id.status_bar);
mStatusBar.setBackgroundResource(getResources().getColor(R.color.android_orange_dark));
// Changes the color of our Tool Bar
Toolbar toolbar = (Toolbar) mToolBarInclude.findViewById(R.id.toolbar);
toolbar.setBackgroundResource(getResources().getColor(R.color.android_orange_light));
}
} }

View File

@ -18,6 +18,10 @@
package org.sufficientlysecure.keychain.ui; package org.sufficientlysecure.keychain.ui;
import android.support.v7.widget.Toolbar;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
/** /**
@ -32,6 +36,23 @@ public class CertifyKeyActivity extends BaseActivity {
@Override @Override
protected void initLayout() { protected void initLayout() {
setContentView(R.layout.certify_key_activity); setContentView(R.layout.certify_key_activity);
changeToolbarColor();
} }
/**
* Changes the color of our ToolBar.
*
* Currently Set to ORANGE
*/
private void changeToolbarColor() {
RelativeLayout mToolBarInclude = (RelativeLayout) findViewById(R.id.toolbar_include);
// Changes the color of the Status Bar strip
ImageView mStatusBar = (ImageView) mToolBarInclude.findViewById(R.id.status_bar);
mStatusBar.setBackgroundResource(getResources().getColor(R.color.android_orange_dark));
// Changes the color of our Tool Bar
Toolbar toolbar = (Toolbar) mToolBarInclude.findViewById(R.id.toolbar);
toolbar.setBackgroundResource(getResources().getColor(R.color.android_orange_light));
}
} }