diff --git a/Graphics/drawables/drawer_header.svg b/Graphics/drawables/drawer_header.svg
index a65b611a8..2e83a8625 100644
--- a/Graphics/drawables/drawer_header.svg
+++ b/Graphics/drawables/drawer_header.svg
@@ -165,15 +165,6 @@
is_visible="true"
id="path-effect4543-2"
effect="spiro" />
-
-
-
@@ -259,7 +250,7 @@
image/svg+xml
-
+
@@ -268,18 +259,27 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-764.36218)">
+
+ y="755.13312" />
@@ -290,7 +290,7 @@
inkscape:connector-curvature="0" />
@@ -302,82 +302,19 @@
-
-
-
-
-
-
-
-
-
+ x="183.26987"
+ y="857.61151" />
-
-
-
-
-
+ style="color:#000000;fill:#d7d6c1;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.03635883;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ x="198.07083"
+ y="921.50952" />
-
+
+ x="233.12956"
+ y="922.58868" />
@@ -854,7 +740,7 @@
inkscape:export-xdpi="134.53"
inkscape:export-filename="/home/rlafuente/Projects/GPG/infog/precolor.png"
style="color:#000000;fill:#beadad;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.03783631;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 247.58163,901.10958 4.44815,12.68535 4.15255,-12.68535 z"
+ d="m 236.86734,900.6045 4.44815,12.68535 4.15255,-12.68535 z"
id="path15562"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
@@ -863,7 +749,7 @@
inkscape:export-xdpi="134.53"
inkscape:export-filename="/home/rlafuente/Projects/GPG/infog/precolor.png"
id="g15564"
- transform="matrix(1.1545885,0,0,1.1545885,-98.476951,579.19816)">
+ transform="matrix(1.1545885,0,0,1.1545885,-109.19124,578.69308)">
@@ -925,7 +811,7 @@
inkscape:export-xdpi="134.53"
inkscape:export-filename="/home/rlafuente/Projects/GPG/infog/precolor.png"
style="color:#000000;fill:#ffe7d2;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.03783631;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 262.31753,897.52851 c 0.19354,-0.72601 0.16693,-1.88313 -1.10226,-2.22144 -1.26903,-0.33886 -1.93811,0.71597 -2.11106,1.36485 -0.23215,0.87079 -0.46115,1.72992 -0.46115,1.72992 l -4.13308,-1.10148 -1.02566,3.84559 7.34623,1.95888 c 0.48451,-1.8172 1.00884,-3.7829 1.48678,-5.57552 z"
+ d="m 251.60324,897.02343 c 0.19354,-0.72601 0.16693,-1.88313 -1.10226,-2.22144 -1.26903,-0.33886 -1.93811,0.71597 -2.11106,1.36485 -0.23215,0.87079 -0.46115,1.72992 -0.46115,1.72992 l -4.13308,-1.10148 -1.02566,3.84559 7.34623,1.95888 c 0.48451,-1.8172 1.00884,-3.7829 1.48678,-5.57552 z"
id="path15580"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cssccccc" />
@@ -934,7 +820,7 @@
inkscape:export-xdpi="134.53"
inkscape:export-filename="/home/rlafuente/Projects/GPG/infog/precolor.png"
style="color:#000000;fill:#beadad;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.03783631;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 254.086,901.27862 6.15042,1.64805 c 0.33184,0.089 0.54884,0.43412 0.43848,0.75949 l -4.82212,14.21495 c -0.11037,0.32536 -0.42958,0.53446 -0.75944,0.43851 l -4.60022,-1.33794 c -0.32996,-0.0958 -0.51396,-0.42442 -0.43846,-0.75948 l 3.27187,-14.52508 c 0.0755,-0.33505 0.42763,-0.52742 0.75946,-0.43839 z"
+ d="m 243.37171,900.77354 6.15042,1.64805 c 0.33184,0.089 0.54884,0.43412 0.43848,0.75949 l -4.82212,14.21495 c -0.11037,0.32536 -0.42958,0.53446 -0.75944,0.43851 l -4.60022,-1.33794 c -0.32996,-0.0958 -0.51396,-0.42442 -0.43846,-0.75948 l 3.27187,-14.52508 c 0.0755,-0.33505 0.42763,-0.52742 0.75946,-0.43839 z"
id="path15582"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssssss" />
@@ -943,7 +829,7 @@
inkscape:export-xdpi="134.53"
inkscape:export-filename="/home/rlafuente/Projects/GPG/infog/precolor.png"
style="color:#000000;fill:#beadad;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.03783631;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 245.22648,926.65278 2.76867,0"
+ d="m 234.51219,926.1477 2.76867,0"
id="path15584"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@@ -954,411 +840,15 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path15586"
- d="m 255.90557,926.65278 2.76866,0"
+ d="m 245.19128,926.1477 2.76866,0"
style="color:#000000;fill:#beadad;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.03783631;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
%#&$!
+ x="224.83459"
+ y="864.56396">%#&$!
+ d="m 259.51352,926.18522 0,41.48181 6.89146,0 0,-3.30297 52.82242,0 0,3.30297 5.59254,0 0,-41.48181 -65.30642,0 z"
+ style="color:#000000;fill:#e2cf96;fill-opacity:1;fill-rule:nonzero;stroke:#213149;stroke-width:2.02179956;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ x="294.30026"
+ y="930.64954" />
+ transform="matrix(1.06884,0.43664155,-0.43664155,1.06884,298.37281,415.4059)">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Open
+ Keychain
diff --git a/Graphics/get-material-icons.sh b/Graphics/get-material-icons.sh
index 652e3063a..e5077276e 100755
--- a/Graphics/get-material-icons.sh
+++ b/Graphics/get-material-icons.sh
@@ -15,3 +15,6 @@ python copy OpenKeychain action black lock_outline 24
python copy OpenKeychain navigation black apps 24
python copy OpenKeychain action black help 24
python copy OpenKeychain action black settings 24
+
+# floating action button
+python copy OpenKeychain av white play_arrow 24
\ No newline at end of file
diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle
index eca62026a..c5d2bbcff 100644
--- a/OpenKeychain/build.gradle
+++ b/OpenKeychain/build.gradle
@@ -28,6 +28,7 @@ dependencies {
compile 'com.jpardogo.materialtabstrip:library:1.0.8'
compile 'it.neokree:MaterialNavigationDrawer:1.3'
compile 'com.nispok:snackbar:2.7.4'
+ compile 'com.getbase:floatingactionbutton:1.7.0'
}
android {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java
index 8abe40016..fa72f4de3 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java
@@ -21,12 +21,18 @@ import android.app.Activity;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+import com.getbase.floatingactionbutton.FloatingActionButton;
+
+import org.spongycastle.util.encoders.Hex;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.OperationResult;
@@ -36,13 +42,22 @@ import org.sufficientlysecure.keychain.remote.AppSettings;
import org.sufficientlysecure.keychain.ui.BaseActivity;
import org.sufficientlysecure.keychain.util.Log;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
public class AppSettingsActivity extends BaseActivity {
private Uri mAppUri;
- private AppSettingsHeaderFragment mSettingsFragment;
private AccountsListFragment mAccountsListFragment;
private AppSettingsAllowedKeysListFragment mAllowedKeysFragment;
+ private TextView mAppNameView;
+ private ImageView mAppIconView;
+ private TextView mPackageName;
+ private TextView mPackageSignature;
+
+ private FloatingActionButton mStartFab;
+
// model
AppSettings mAppSettings;
@@ -50,23 +65,26 @@ public class AppSettingsActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setFullScreenDialogDoneClose(R.string.api_settings_save,
- new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- save();
- }
- },
- new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- cancel();
- }
- });
- setTitle(null);
+ mAppNameView = (TextView) findViewById(R.id.api_app_settings_app_name);
+ mAppIconView = (ImageView) findViewById(R.id.api_app_settings_app_icon);
+ mPackageName = (TextView) findViewById(R.id.api_app_settings_package_name);
+ mPackageSignature = (TextView) findViewById(R.id.api_app_settings_package_signature);
+ mStartFab = (FloatingActionButton) findViewById(R.id.fab);
- mSettingsFragment = (AppSettingsHeaderFragment) getSupportFragmentManager().findFragmentById(
- R.id.api_app_settings_fragment);
+ mStartFab.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startApp();
+ }
+ });
+
+ setFullScreenDialogClose(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ cancel();
+ }
+ });
+ setTitle(null);
Intent intent = getIntent();
mAppUri = intent.getData();
@@ -109,8 +127,8 @@ public class AppSettingsActivity extends BaseActivity {
case R.id.menu_api_settings_revoke:
revokeAccess();
return true;
- case R.id.menu_api_settings_start:
- startApp();
+ case R.id.menu_api_save:
+ save();
return true;
}
return super.onOptionsItemSelected(item);
@@ -134,18 +152,37 @@ public class AppSettingsActivity extends BaseActivity {
private void loadData(Bundle savedInstanceState, Uri appUri) {
mAppSettings = new ProviderHelper(this).getApiAppSettings(appUri);
- mSettingsFragment.setAppSettings(mAppSettings);
-// String appName;
-// PackageManager pm = getPackageManager();
-// try {
-// ApplicationInfo ai = pm.getApplicationInfo(mAppSettings.getPackageName(), 0);
-// appName = (String) pm.getApplicationLabel(ai);
-// } catch (PackageManager.NameNotFoundException e) {
-// // fallback
-// appName = mAppSettings.getPackageName();
-// }
-// setTitle(appName);
+ // get application name and icon from package manager
+ String appName;
+ Drawable appIcon = null;
+ PackageManager pm = getApplicationContext().getPackageManager();
+ try {
+ ApplicationInfo ai = pm.getApplicationInfo(mAppSettings.getPackageName(), 0);
+
+ appName = (String) pm.getApplicationLabel(ai);
+ appIcon = pm.getApplicationIcon(ai);
+ } catch (PackageManager.NameNotFoundException e) {
+ // fallback
+ appName = mAppSettings.getPackageName();
+ }
+ mAppNameView.setText(appName);
+ mAppIconView.setImageDrawable(appIcon);
+
+ // advanced info: package name
+ mPackageName.setText(mAppSettings.getPackageName());
+
+ // advanced info: package signature SHA-256
+ try {
+ MessageDigest md = MessageDigest.getInstance("SHA-256");
+ md.update(mAppSettings.getPackageSignature());
+ byte[] digest = md.digest();
+ String signature = new String(Hex.encode(digest));
+
+ mPackageSignature.setText(signature);
+ } catch (NoSuchAlgorithmException e) {
+ Log.e(Constants.TAG, "Should not happen!", e);
+ }
Uri accountsUri = appUri.buildUpon().appendPath(KeychainContract.PATH_ACCOUNTS).build();
Log.d(Constants.TAG, "accountsUri: " + accountsUri);
diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.png
new file mode 100644
index 000000000..164385d04
Binary files /dev/null and b/OpenKeychain/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.png differ
diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_play_arrow_white_24dp.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_play_arrow_white_24dp.png
new file mode 100644
index 000000000..8d1e433a5
Binary files /dev/null and b/OpenKeychain/src/main/res/drawable-mdpi/ic_play_arrow_white_24dp.png differ
diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png
new file mode 100644
index 000000000..a55d19922
Binary files /dev/null and b/OpenKeychain/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png differ
diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.png
new file mode 100644
index 000000000..043acd808
Binary files /dev/null and b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.png differ
diff --git a/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_24dp.png b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_24dp.png
new file mode 100644
index 000000000..7cc008475
Binary files /dev/null and b/OpenKeychain/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_24dp.png differ
diff --git a/OpenKeychain/src/main/res/drawable/drawer_header.png b/OpenKeychain/src/main/res/drawable/drawer_header.png
index 614098bd7..373534722 100644
Binary files a/OpenKeychain/src/main/res/drawable/drawer_header.png and b/OpenKeychain/src/main/res/drawable/drawer_header.png differ
diff --git a/OpenKeychain/src/main/res/layout/api_account_settings_activity.xml b/OpenKeychain/src/main/res/layout/api_account_settings_activity.xml
index 763504f54..b12bfb080 100644
--- a/OpenKeychain/src/main/res/layout/api_account_settings_activity.xml
+++ b/OpenKeychain/src/main/res/layout/api_account_settings_activity.xml
@@ -5,7 +5,7 @@
+ layout="@layout/toolbar_standalone" />
-
+
+
+
+
+
+
+
+
+
+
+
-
-
@@ -55,7 +95,56 @@
android:layout_height="match_parent"
android:orientation="vertical" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenKeychain/src/main/res/layout/api_remote_create_account.xml b/OpenKeychain/src/main/res/layout/api_remote_create_account.xml
index 7ae0a0e1e..f57ec9ad1 100644
--- a/OpenKeychain/src/main/res/layout/api_remote_create_account.xml
+++ b/OpenKeychain/src/main/res/layout/api_remote_create_account.xml
@@ -5,7 +5,7 @@
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ android:orientation="vertical"
+ android:elevation="4dp">
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
\ No newline at end of file
diff --git a/OpenKeychain/src/main/res/layout/qr_code_activity.xml b/OpenKeychain/src/main/res/layout/qr_code_activity.xml
index 79aba346f..fd495608c 100644
--- a/OpenKeychain/src/main/res/layout/qr_code_activity.xml
+++ b/OpenKeychain/src/main/res/layout/qr_code_activity.xml
@@ -5,7 +5,7 @@
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
+ layout="@layout/toolbar_standalone" />
- #388E3C
#C8E6C9
#00BCD4
+ #00BCD4
+ #0097A7
#212121
#727272
#FFFFFF