Implemented #1162: Invoke NFC in Advanced View
- Extracted NFC code from ViewKeyActivity to NfcHelper to share code between classes - Changed the private anonymous Handler for NFC into a static private subclass, that uses WeakReference to avoid memory leaks - Added resources needed (retrieved from Graphics) for the NFC button inside ViewKeyAdvShareFragment. - Fixed the ripple boundary of the Share With... button to prevent it from bleeding to other buttons on the right (UX improvement)
This commit is contained in:
BIN
OpenKeychain/src/main/res/drawable-hdpi/ic_nfc_grey_24dp.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-hdpi/ic_nfc_grey_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
OpenKeychain/src/main/res/drawable-mdpi/ic_nfc_grey_24dp.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-mdpi/ic_nfc_grey_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 701 B |
BIN
OpenKeychain/src/main/res/drawable-xhdpi/ic_nfc_grey_24dp.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-xhdpi/ic_nfc_grey_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
OpenKeychain/src/main/res/drawable-xxhdpi/ic_nfc_grey_24dp.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-xxhdpi/ic_nfc_grey_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
OpenKeychain/src/main/res/drawable-xxxhdpi/ic_nfc_grey_24dp.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-xxxhdpi/ic_nfc_grey_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -99,14 +99,12 @@
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_key_action_key_share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
android:clickable="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/view_key_action_key_share"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
@@ -116,7 +114,25 @@
|
||||
android:layout_weight="1"
|
||||
android:drawableRight="@drawable/ic_share_grey_24dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical" />
|
||||
android:gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground"/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="right"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/view_key_action_key_nfc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_nfc_grey_24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dip"
|
||||
@@ -154,6 +170,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
|
||||
Reference in New Issue
Block a user