Use RecyclerView in EncryptFilesFragment
This commit is contained in:
@@ -4,15 +4,10 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/selected_files_list"
|
||||
android:dividerHeight="4dip"
|
||||
android:divider="@android:color/transparent"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
@@ -1,60 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dip"
|
||||
android:background="@drawable/attachment_bg_holo">
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dip"
|
||||
android:background="@drawable/attachment_bg_holo">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/thumbnail"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="center"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="48dip"/>
|
||||
android:id="@+id/thumbnail"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="center"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="48dip" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/thumbnail"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/filename"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/thumbnail"
|
||||
android:layout_centerVertical="true">
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/filename"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/filesize"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="12sp"
|
||||
android:ellipsize="end"/>
|
||||
android:id="@+id/filesize"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="12sp"
|
||||
android:ellipsize="end" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_remove_file_from_list"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingRight="16dip"
|
||||
android:paddingLeft="16dip"
|
||||
android:src="@drawable/ic_close_grey_24dp"
|
||||
android:clickable="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="?android:selectableItemBackground"/>
|
||||
android:id="@+id/action_remove_file_from_list"
|
||||
android:layout_width="48dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingRight="16dip"
|
||||
android:paddingLeft="16dip"
|
||||
android:src="@drawable/ic_close_grey_24dp"
|
||||
android:clickable="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
</RelativeLayout>
|
||||
@@ -1,21 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:padding="4dp"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
style="?android:attr/borderlessButtonStyle">
|
||||
android:minHeight="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:singleLine="true">
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/file_list_entry_add"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/btn_add_files"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:drawableLeft="@drawable/ic_folder_grey_24dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center" />
|
||||
</FrameLayout>
|
||||
android:drawablePadding="16dp"
|
||||
android:gravity="left|center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user