First work on new key view toolbar

This commit is contained in:
Dominik Schürmann
2015-02-25 02:35:09 +01:00
parent 2b609b8144
commit 56d38dd68b
33 changed files with 599 additions and 930 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -9,11 +9,22 @@
<RelativeLayout
android:id="@+id/toolbar_big"
android:layout_width="match_parent"
android:layout_height="@dimen/big_toolbar"
android:layout_height="@dimen/huge_toolbar"
android:elevation="4dp"
android:background="?attr/colorPrimary"
android:orientation="horizontal">
<org.sufficientlysecure.keychain.ui.widget.AspectRatioImageView
android:id="@+id/view_key_photo"
app:aspectRatioEnabled="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/status_bar"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:src="@drawable/first_time_1" />
<ImageView
android:id="@+id/status_bar"
android:layout_width="match_parent"
@@ -26,7 +37,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:overScrollMode="always"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
@@ -35,46 +45,84 @@
android:touchscreenBlocksFocus="false" />
<LinearLayout
android:layout_below="@+id/toolbar"
android:layout_marginLeft="48dp"
android:layout_marginRight="72dp"
android:id="@+id/name_layout"
android:orientation="horizontal"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_above="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/view_key_status_layout"
android:layout_width="wrap_content"
<ImageView
android:id="@+id/view_key_status_image"
android:layout_width="24dp"
android:visibility="invisible"
android:src="@drawable/status_signature_unverified_cutout"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
android:layout_gravity="center_vertical"
android:layout_marginLeft="2dp" />
<ImageView
android:id="@+id/view_key_status_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:orientation="vertical"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/view_key_status_text"
android:id="@+id/view_key_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp" />
android:text=""
android:textColor="@color/icons"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/view_key_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/tab_text"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<TextView
android:id="@+id/api_app_settings_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name (set in-code)longlong"
android:textColor="@color/icons"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingLeft="8dp"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout
android:id="@+id/toolbar2"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="32dp">
<ImageButton
android:id="@+id/view_key_action_encrypt_files"
android:layout_width="64dp"
android:layout_height="64dp"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/ic_action_encrypt_file" />
<ImageButton
android:id="@+id/view_key_action_encrypt_text"
android:layout_width="64dp"
android:layout_height="64dp"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/ic_action_encrypt_text" />
<ImageButton
android:id="@+id/view_key_action_verify"
android:layout_width="64dp"
android:layout_height="64dp"
android:visibility="invisible"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/ic_action_verified_cutout" />
</LinearLayout>
</RelativeLayout>
<LinearLayout

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_key_view_refresh"
android:icon="@drawable/ic_refresh_white_24dp"
app:showAsAction="always"
android:title="@string/key_view_action_update" />
</menu>

View File

@@ -7,4 +7,5 @@
<dimen name="statusbar_height">24dp</dimen>
<!-- 120dp + statusbar_height -->
<dimen name="big_toolbar">141dp</dimen>
<dimen name="huge_toolbar">233dp</dimen>
</resources>

View File

@@ -6,4 +6,13 @@
<attr name="unFoldedLabel" format="string" />
</declare-styleable>
<declare-styleable name="AspectRatioImageView">
<attr name="aspectRatio" format="float" />
<attr name="aspectRatioEnabled" format="boolean" />
<attr name="dominantMeasurement">
<enum name="width" value="0" />
<enum name="height" value="1" />
</attr>
</declare-styleable>
</resources>

View File

@@ -3,4 +3,5 @@
<!-- on Android < 5, we do not color the status bar, thus 0dp! -->
<dimen name="statusbar_height">0dp</dimen>
<dimen name="big_toolbar">120dp</dimen>
<dimen name="huge_toolbar">212dp</dimen>
</resources>

View File

@@ -582,8 +582,11 @@
<string name="create_key_edit">"Change key configuration"</string>
<!-- View key -->
<string name="view_key_revoked">"This key has been revoked!"</string>
<string name="view_key_expired">"This key is expired!"</string>
<string name="view_key_revoked">"Revoked: Key must not be used anymore!"</string>
<string name="view_key_expired">"Expired: The contact needs to extend the keys validity!"</string>
<string name="view_key_my_key">"My Key"</string>
<string name="view_key_verified">"Verified Key"</string>
<string name="view_key_unverified">"Unverified: Scan QR Code to verify key!"</string>
<!-- Navigation Drawer -->
<string name="nav_keys">"Keys"</string>