diff options
3 files changed, 269 insertions, 288 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index 1c4a096b2..ab97ac463 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -32,6 +32,9 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.provider.ContactsContract; +import android.support.design.widget.AppBarLayout; +import android.support.design.widget.CollapsingToolbarLayout; +import android.support.design.widget.FloatingActionButton; import android.support.v4.app.ActivityCompat; import android.support.v4.app.FragmentManager; import android.support.v4.app.LoaderManager; @@ -51,7 +54,6 @@ import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; -import com.getbase.floatingactionbutton.FloatingActionButton; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; @@ -107,10 +109,10 @@ public class ViewKeyActivity extends BaseNfcActivity implements private ArrayList<ParcelableKeyRing> mKeyList; private CryptoOperationHelper<ImportKeyringParcel, ImportKeyResult> mOperationHelper; - private TextView mName; private TextView mStatusText; private ImageView mStatusImage; - private RelativeLayout mBigToolbar; + private AppBarLayout mAppBarLayout; + private CollapsingToolbarLayout mCollapsingToolbarLayout; private ImageButton mActionEncryptFile; private ImageButton mActionEncryptText; @@ -156,10 +158,10 @@ public class ViewKeyActivity extends BaseNfcActivity implements setTitle(null); - mName = (TextView) findViewById(R.id.view_key_name); mStatusText = (TextView) findViewById(R.id.view_key_status); mStatusImage = (ImageView) findViewById(R.id.view_key_status_image); - mBigToolbar = (RelativeLayout) findViewById(R.id.toolbar_big); + mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar_layout); + mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar); mActionEncryptFile = (ImageButton) findViewById(R.id.view_key_action_encrypt_files); mActionEncryptText = (ImageButton) findViewById(R.id.view_key_action_encrypt_text); @@ -736,9 +738,9 @@ public class ViewKeyActivity extends BaseNfcActivity implements // get name, email, and comment from USER_ID KeyRing.UserId mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID)); if (mainUserId.name != null) { - mName.setText(mainUserId.name); + mCollapsingToolbarLayout.setTitle(mainUserId.name); } else { - mName.setText(R.string.user_id_no_name); + mCollapsingToolbarLayout.setTitle(getString(R.string.user_id_no_name)); } mMasterKeyId = data.getLong(INDEX_MASTER_KEY_ID); @@ -789,9 +791,9 @@ public class ViewKeyActivity extends BaseNfcActivity implements State.REVOKED, R.color.icons, true); color = getResources().getColor(R.color.key_flag_red); - mActionEncryptFile.setVisibility(View.GONE); - mActionEncryptText.setVisibility(View.GONE); - mActionNfc.setVisibility(View.GONE); + mActionEncryptFile.setVisibility(View.INVISIBLE); + mActionEncryptText.setVisibility(View.INVISIBLE); + mActionNfc.setVisibility(View.INVISIBLE); mFab.setVisibility(View.GONE); mQrCodeLayout.setVisibility(View.GONE); } else if (mIsExpired) { @@ -805,9 +807,9 @@ public class ViewKeyActivity extends BaseNfcActivity implements State.EXPIRED, R.color.icons, true); color = getResources().getColor(R.color.key_flag_red); - mActionEncryptFile.setVisibility(View.GONE); - mActionEncryptText.setVisibility(View.GONE); - mActionNfc.setVisibility(View.GONE); + mActionEncryptFile.setVisibility(View.INVISIBLE); + mActionEncryptText.setVisibility(View.INVISIBLE); + mActionNfc.setVisibility(View.INVISIBLE); mFab.setVisibility(View.GONE); mQrCodeLayout.setVisibility(View.GONE); } else if (mIsSecret) { @@ -822,15 +824,15 @@ public class ViewKeyActivity extends BaseNfcActivity implements mQrCodeLayout.setVisibility(View.VISIBLE); // and place leftOf qr code - RelativeLayout.LayoutParams nameParams = (RelativeLayout.LayoutParams) - mName.getLayoutParams(); - // remove right margin - nameParams.setMargins(FormattingUtils.dpToPx(this, 48), 0, 0, 0); - if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { - nameParams.setMarginEnd(0); - } - nameParams.addRule(RelativeLayout.LEFT_OF, R.id.view_key_qr_code_layout); - mName.setLayoutParams(nameParams); +// RelativeLayout.LayoutParams nameParams = (RelativeLayout.LayoutParams) +// mName.getLayoutParams(); +// // remove right margin +// nameParams.setMargins(FormattingUtils.dpToPx(this, 48), 0, 0, 0); +// if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { +// nameParams.setMarginEnd(0); +// } +// nameParams.addRule(RelativeLayout.LEFT_OF, R.id.view_key_qr_code_layout); +// mName.setLayoutParams(nameParams); RelativeLayout.LayoutParams statusParams = (RelativeLayout.LayoutParams) mStatusText.getLayoutParams(); @@ -852,7 +854,7 @@ public class ViewKeyActivity extends BaseNfcActivity implements } mFab.setVisibility(View.VISIBLE); // noinspection deprecation (no getDrawable with theme at current minApi level 15!) - mFab.setIconDrawable(getResources().getDrawable(R.drawable.ic_repeat_white_24dp)); + mFab.setImageDrawable(getResources().getDrawable(R.drawable.ic_repeat_white_24dp)); } else { mActionEncryptFile.setVisibility(View.VISIBLE); mActionEncryptText.setVisibility(View.VISIBLE); @@ -880,22 +882,17 @@ public class ViewKeyActivity extends BaseNfcActivity implements } if (mPreviousColor == 0 || mPreviousColor == color) { - mStatusBar.setBackgroundColor(getStatusBarBackgroundColor(color)); - mBigToolbar.setBackgroundColor(color); + mAppBarLayout.setBackgroundColor(color); + mCollapsingToolbarLayout.setContentScrimColor(color); + mCollapsingToolbarLayout.setStatusBarScrimColor(getStatusBarBackgroundColor(color)); mPreviousColor = color; } else { - ObjectAnimator colorFade1 = - ObjectAnimator.ofObject(mStatusBar, "backgroundColor", - new ArgbEvaluator(), mPreviousColor, - getStatusBarBackgroundColor(color)); - ObjectAnimator colorFade2 = - ObjectAnimator.ofObject(mBigToolbar, "backgroundColor", + ObjectAnimator colorFade = + ObjectAnimator.ofObject(mAppBarLayout, "backgroundColor", new ArgbEvaluator(), mPreviousColor, color); - colorFade1.setDuration(1200); - colorFade2.setDuration(1200); - colorFade1.start(); - colorFade2.start(); + colorFade.setDuration(1200); + colorFade.start(); mPreviousColor = color; } diff --git a/OpenKeychain/src/main/res/layout/view_key_activity.xml b/OpenKeychain/src/main/res/layout/view_key_activity.xml index 32c63abb2..89e88fdcf 100644 --- a/OpenKeychain/src/main/res/layout/view_key_activity.xml +++ b/OpenKeychain/src/main/res/layout/view_key_activity.xml @@ -1,183 +1,178 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<android.support.design.widget.CoordinatorLayout 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" - xmlns:fab="http://schemas.android.com/apk/res-auto" xmlns:card_view="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/main_content" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:fitsSystemWindows="true"> - <RelativeLayout - android:id="@+id/toolbar_big" + <android.support.design.widget.AppBarLayout + android:id="@+id/app_bar_layout" android:layout_width="match_parent" - android:layout_height="@dimen/huge_toolbar" - android:elevation="4dp" - android:background="?attr/colorPrimary" - android:orientation="horizontal"> - - <ImageView - android:id="@+id/view_key_photo" - android:visibility="gone" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_below="@+id/status_bar" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:src="@drawable/ic_launcher" - android:baselineAlignBottom="false" - android:cropToPadding="false" - android:focusable="false" - android:adjustViewBounds="false" - android:layout_alignParentTop="false" - android:scaleType="centerCrop" /> - - <ImageView - android:id="@+id/status_bar" - android:layout_width="match_parent" - android:layout_height="@dimen/statusbar_height" - android:background="?attr/colorPrimary" /> + android:layout_height="wrap_content" + android:background="@color/primary" + android:fitsSystemWindows="true" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> - <android.support.v7.widget.Toolbar - android:id="@+id/toolbar" - android:background="@color/transparent" - android:layout_below="@+id/status_bar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:overScrollMode="always" - android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" - app:popupTheme="@style/ThemeOverlay.AppCompat.Light" - tools:ignore="UnusedAttribute" - android:transitionGroup="false" - android:touchscreenBlocksFocus="false" /> - - <TextView - android:id="@+id/view_key_name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="48dp" - android:layout_marginStart="48dp" - android:layout_marginRight="48dp" - android:layout_marginEnd="48dp" - android:text="" - tools:text="Alice Skywalker" - android:textColor="@color/icons" - android:textAppearance="?android:attr/textAppearanceLarge" - android:layout_above="@+id/view_key_status" /> - - <TextView - android:id="@+id/view_key_status" + <android.support.design.widget.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="48dp" - android:layout_marginStart="48dp" - android:layout_marginRight="48dp" - android:layout_marginEnd="48dp" - android:text="" - tools:text="My Key" - android:textColor="?attr/colorTabText" - android:textAppearance="?android:attr/textAppearanceSmall" - android:layout_above="@+id/toolbar2" /> - - <LinearLayout - android:id="@+id/toolbar2" - android:orientation="horizontal" - android:layout_alignParentBottom="true" - android:layout_width="wrap_content" - android:minHeight="?attr/actionBarSize" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_marginLeft="32dp" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true"> - - <ImageButton - android:id="@+id/view_key_action_encrypt_files" - android:layout_width="64dp" - android:layout_height="64dp" - android:visibility="invisible" - tools:visibility="visible" - style="?android:attr/borderlessButtonStyle" - android:src="@drawable/ic_action_encrypt_file_24dp" /> - - <ImageButton - android:id="@+id/view_key_action_encrypt_text" - android:layout_width="64dp" - android:layout_height="64dp" - android:visibility="invisible" - tools:visibility="visible" - style="?android:attr/borderlessButtonStyle" - android:src="@drawable/ic_action_encrypt_text_24dp" /> - - <ImageButton - android:id="@+id/view_key_action_nfc" - android:layout_width="64dp" - android:layout_height="64dp" - android:visibility="invisible" - tools:visibility="visible" - style="?android:attr/borderlessButtonStyle" - android:src="@drawable/ic_nfc_white_24dp" /> - - </LinearLayout> - - <ImageView - android:id="@+id/view_key_status_image" - android:layout_width="96dp" - android:visibility="invisible" - tools:visibility="visible" - android:src="@drawable/status_signature_unverified_cutout_96dp" - android:layout_height="96dp" - android:layout_above="@id/toolbar2" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true" - android:layout_marginRight="16dp" /> - - <android.support.v7.widget.CardView - android:id="@+id/view_key_qr_code_layout" - android:transitionName="qr_code" - android:visibility="visible" - android:layout_above="@id/toolbar2" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true" - android:layout_marginRight="20dp" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:clickable="true" - android:foreground="?android:attr/selectableItemBackground" - tools:visibility="invisible" - card_view:cardBackgroundColor="@android:color/white" - card_view:cardElevation="2dp" - card_view:cardUseCompatPadding="true" - card_view:cardCornerRadius="4dp"> - - <ImageView - android:id="@+id/view_key_qr_code" - android:layout_width="96dp" - android:layout_height="96dp" - /> - </android.support.v7.widget.CardView> - - </RelativeLayout> - - <LinearLayout - android:id="@+id/body" - android:layout_below="@id/toolbar_big" - android:orientation="vertical" + android:layout_height="match_parent" + android:fitsSystemWindows="true" + app:contentScrim="@color/primary" + app:expandedTitleMarginBottom="102dp" + app:expandedTitleMarginEnd="128dp" + app:expandedTitleMarginStart="47dp" + app:expandedTitleTextAppearance="@style/TextAppearance.AppCompat.Headline" + app:layout_scrollFlags="scroll|exitUntilCollapsed"> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="238dp" + android:fitsSystemWindows="true" + app:layout_collapseMode="parallax"> + + <ImageView + android:id="@+id/view_key_photo" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_alignParentTop="false" + android:adjustViewBounds="false" + android:baselineAlignBottom="false" + android:cropToPadding="false" + android:fitsSystemWindows="true" + android:focusable="false" + android:scaleType="centerCrop" + android:src="@drawable/ic_launcher" + android:visibility="gone" /> + + <TextView + android:id="@+id/view_key_status" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_above="@+id/toolbar2" + android:layout_marginEnd="48dp" + android:layout_marginLeft="48dp" + android:layout_marginRight="48dp" + android:layout_marginStart="48dp" + android:text="" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="?attr/colorTabText" + tools:text="My Key" /> + + <LinearLayout + android:id="@+id/toolbar2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="true" + android:layout_alignParentStart="true" + android:layout_marginLeft="32dp" + android:minHeight="?attr/actionBarSize" + android:orientation="horizontal"> + + <ImageButton + android:id="@+id/view_key_action_encrypt_files" + style="?android:attr/borderlessButtonStyle" + android:layout_width="64dp" + android:layout_height="64dp" + android:src="@drawable/ic_action_encrypt_file_24dp" + android:visibility="invisible" + tools:visibility="visible" /> + + <ImageButton + android:id="@+id/view_key_action_encrypt_text" + style="?android:attr/borderlessButtonStyle" + android:layout_width="64dp" + android:layout_height="64dp" + android:src="@drawable/ic_action_encrypt_text_24dp" + android:visibility="invisible" + tools:visibility="visible" /> + + <ImageButton + android:id="@+id/view_key_action_nfc" + style="?android:attr/borderlessButtonStyle" + android:layout_width="64dp" + android:layout_height="64dp" + android:src="@drawable/ic_nfc_white_24dp" + android:visibility="invisible" + tools:visibility="visible" /> + + </LinearLayout> + + <ImageView + android:id="@+id/view_key_status_image" + android:layout_width="96dp" + android:layout_height="96dp" + android:layout_above="@id/toolbar2" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_marginRight="16dp" + android:src="@drawable/status_signature_unverified_cutout_96dp" + android:visibility="invisible" + tools:visibility="visible" /> + + <android.support.v7.widget.CardView + android:id="@+id/view_key_qr_code_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@id/toolbar2" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_marginRight="20dp" + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" + android:transitionName="qr_code" + android:visibility="visible" + app:layout_collapseMode="parallax" + card_view:cardBackgroundColor="@android:color/white" + card_view:cardCornerRadius="4dp" + card_view:cardElevation="2dp" + card_view:cardUseCompatPadding="true" + tools:visibility="invisible"> + + <ImageView + android:id="@+id/view_key_qr_code" + android:layout_width="96dp" + android:layout_height="96dp" /> + </android.support.v7.widget.CardView> + + </RelativeLayout> + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:elevation="4dp" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + android:touchscreenBlocksFocus="false" + android:transitionGroup="false" + app:layout_collapseMode="pin" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" + tools:ignore="UnusedAttribute" /> + </android.support.design.widget.CollapsingToolbarLayout> + + </android.support.design.widget.AppBarLayout> + + <android.support.v4.widget.NestedScrollView + android:id="@+id/scroll" android:layout_width="match_parent" - android:layout_height="match_parent"> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" - android:visibility="gone" - android:id="@+id/view_key_status_divider" /> + android:layout_height="match_parent" + android:layout_gravity="fill_vertical" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> + <!-- it is not scrolling far enough down thus adding padding --> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:paddingBottom="160dp"> <FrameLayout android:id="@+id/view_key_fragment" @@ -186,21 +181,16 @@ android:orientation="vertical" /> </FrameLayout> - </LinearLayout> - <com.getbase.floatingactionbutton.FloatingActionButton + </android.support.v4.widget.NestedScrollView> + + <android.support.design.widget.FloatingActionButton android:id="@+id/fab" - android:layout_alignBottom="@id/toolbar_big" - android:layout_alignParentRight="true" - android:layout_marginRight="20dp" - android:layout_marginBottom="-40dp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:visibility="invisible" - tools:visibility="visible" - android:elevation="4dp" - fab:fab_icon="@drawable/ic_qrcode_white_24dp" - fab:fab_colorNormal="?attr/colorFab" - fab:fab_colorPressed="?attr/colorFabPressed" /> - -</RelativeLayout> + android:layout_margin="24dp" + android:src="@drawable/ic_qrcode_white_24dp" + app:layout_anchor="@id/app_bar_layout" + app:layout_anchorGravity="bottom|right|end" /> + +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/view_key_fragment.xml b/OpenKeychain/src/main/res/layout/view_key_fragment.xml index 8c1023427..0d15ba7dc 100644 --- a/OpenKeychain/src/main/res/layout/view_key_fragment.xml +++ b/OpenKeychain/src/main/res/layout/view_key_fragment.xml @@ -1,95 +1,89 @@ -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:card_view="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="match_parent"> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:card_view="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="16dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:paddingTop="16dp"> - <LinearLayout + <android.support.v7.widget.CardView + android:id="@+id/card_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingTop="16dp" - android:paddingBottom="16dp" - android:paddingLeft="16dp" - android:paddingRight="16dp"> + android:layout_gravity="center" + card_view:cardBackgroundColor="?attr/colorCardViewBackground" + card_view:cardCornerRadius="4dp" + card_view:cardElevation="2dp" + card_view:cardUseCompatPadding="true"> - <android.support.v7.widget.CardView - android:id="@+id/card_view" - android:layout_gravity="center" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - card_view:cardBackgroundColor="?attr/colorCardViewBackground" - card_view:cardElevation="2dp" - card_view:cardUseCompatPadding="true" - card_view:cardCornerRadius="4dp"> + android:orientation="vertical"> - <LinearLayout - android:layout_width="match_parent" + <TextView + style="@style/CardViewHeader" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="vertical"> + android:text="@string/section_user_ids" /> - <TextView - style="@style/CardViewHeader" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/section_user_ids"/> + <org.sufficientlysecure.keychain.ui.widget.FixedListView + android:id="@+id/view_key_user_ids" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="4dp" /> + </LinearLayout> + </android.support.v7.widget.CardView> - <org.sufficientlysecure.keychain.ui.widget.FixedListView - android:id="@+id/view_key_user_ids" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="4dp"/> - </LinearLayout> - </android.support.v7.widget.CardView> + <android.support.v7.widget.CardView + android:id="@+id/linked_system_contact_card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:visibility="gone" + card_view:cardBackgroundColor="?attr/colorCardViewBackground" + card_view:cardCornerRadius="4dp" + card_view:cardElevation="2dp" + card_view:cardUseCompatPadding="true"> - <android.support.v7.widget.CardView - android:id="@+id/linked_system_contact_card" - android:layout_gravity="center" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:visibility="gone" - card_view:cardBackgroundColor="?attr/colorCardViewBackground" - card_view:cardElevation="2dp" - card_view:cardUseCompatPadding="true" - card_view:cardCornerRadius="4dp"> + android:orientation="vertical"> + + <TextView + style="@style/CardViewHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/section_linked_system_contact" /> <LinearLayout + android:id='@+id/system_contact_layout' android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> + android:background="?android:selectableItemBackground" + android:clickable="true" + android:orientation="horizontal"> + + <ImageView + android:id="@+id/system_contact_picture" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_margin="6dp" + android:scaleType="centerCrop" + android:src="@drawable/ic_person_grey_48dp" /> <TextView - style="@style/CardViewHeader" + android:id="@+id/system_contact_name" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/section_linked_system_contact"/> - - <LinearLayout - android:id='@+id/system_contact_layout' - android:clickable="true" - android:background="?android:selectableItemBackground" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <ImageView - android:id="@+id/system_contact_picture" - android:layout_margin="6dp" - android:layout_width="48dp" - android:layout_height="48dp" - android:scaleType="centerCrop" - android:src="@drawable/ic_person_grey_48dp"/> - - <TextView - android:id="@+id/system_contact_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:textAppearance="?android:attr/textAppearanceMedium" - android:text="@string/view_key_fragment_no_system_contact"/> - </LinearLayout> + android:layout_gravity="center_vertical" + android:text="@string/view_key_fragment_no_system_contact" + android:textAppearance="?android:attr/textAppearanceMedium" /> </LinearLayout> - </android.support.v7.widget.CardView> - - </LinearLayout> + </LinearLayout> + </android.support.v7.widget.CardView> -</ScrollView> +</LinearLayout>
\ No newline at end of file |