mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 07:58:50 -05:00
Orange Toolbar Added Fixes #1088
This commit is contained in:
parent
eedc7064b9
commit
0362dc6c1d
@ -19,10 +19,7 @@ package org.sufficientlysecure.keychain.ui;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
@ -58,7 +55,6 @@ public class CertifyFingerprintActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void initLayout() {
|
||||
setContentView(R.layout.certify_fingerprint_activity);
|
||||
changeToolbarColor();
|
||||
}
|
||||
|
||||
private void startFragment(Bundle savedInstanceState, Uri dataUri) {
|
||||
@ -81,21 +77,4 @@ public class CertifyFingerprintActivity extends BaseActivity {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,10 +18,6 @@
|
||||
|
||||
package org.sufficientlysecure.keychain.ui;
|
||||
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
|
||||
/**
|
||||
@ -36,23 +32,6 @@ public class CertifyKeyActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void initLayout() {
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar_include"
|
||||
layout="@layout/toolbar_standalone" />
|
||||
layout="@layout/toolbar_standalone_orange" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_below="@id/toolbar_include"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar_include"
|
||||
layout="@layout/toolbar_standalone" />
|
||||
layout="@layout/toolbar_standalone_orange" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_below="@id/toolbar_include"
|
||||
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/toolbar_include"
|
||||
android:elevation="4dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!--
|
||||
We always have windowTranslucentStatus=true to get under the status bar.
|
||||
Thus this ImageView is the part under the status bar!
|
||||
-->
|
||||
<ImageView
|
||||
android:id="@+id/status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/statusbar_height"
|
||||
android:background="@color/android_orange_dark" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_below="@+id/status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:background="@color/android_orange_light"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user