prefix all library resources with smtfp
@@ -13,7 +13,7 @@ import com.simplemobiletools.filemanager.R
|
|||||||
import com.simplemobiletools.filemanager.extensions.formatSize
|
import com.simplemobiletools.filemanager.extensions.formatSize
|
||||||
import com.simplemobiletools.filemanager.extensions.getColoredIcon
|
import com.simplemobiletools.filemanager.extensions.getColoredIcon
|
||||||
import com.simplemobiletools.filepicker.models.FileDirItem
|
import com.simplemobiletools.filepicker.models.FileDirItem
|
||||||
import kotlinx.android.synthetic.main.list_item.view.*
|
import kotlinx.android.synthetic.main.smtfp_list_item.view.*
|
||||||
|
|
||||||
class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : BaseAdapter() {
|
class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : BaseAdapter() {
|
||||||
private val mInflater: LayoutInflater
|
private val mInflater: LayoutInflater
|
||||||
@@ -33,7 +33,7 @@ class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : Ba
|
|||||||
var view = convertView
|
var view = convertView
|
||||||
val viewHolder: ViewHolder
|
val viewHolder: ViewHolder
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = mInflater.inflate(R.layout.list_item, parent, false)
|
view = mInflater.inflate(R.layout.smtfp_list_item, parent, false)
|
||||||
viewHolder = ViewHolder(view)
|
viewHolder = ViewHolder(view)
|
||||||
view!!.tag = viewHolder
|
view!!.tag = viewHolder
|
||||||
} else {
|
} else {
|
||||||
|
@@ -13,7 +13,7 @@ import com.simplemobiletools.filemanager.Utils
|
|||||||
import com.simplemobiletools.filemanager.adapters.ItemsAdapter
|
import com.simplemobiletools.filemanager.adapters.ItemsAdapter
|
||||||
import com.simplemobiletools.filemanager.fragments.ItemsFragment
|
import com.simplemobiletools.filemanager.fragments.ItemsFragment
|
||||||
import com.simplemobiletools.filepicker.models.FileDirItem
|
import com.simplemobiletools.filepicker.models.FileDirItem
|
||||||
import kotlinx.android.synthetic.main.directory_picker.view.*
|
import kotlinx.android.synthetic.main.smtfp_directory_picker.view.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.comparisons.compareBy
|
import kotlin.comparisons.compareBy
|
||||||
@@ -33,7 +33,7 @@ class SelectFolderDialog : DialogFragment() {
|
|||||||
lateinit var dialog: View
|
lateinit var dialog: View
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
dialog = activity.layoutInflater.inflate(R.layout.directory_picker, null)
|
dialog = activity.layoutInflater.inflate(R.layout.smtfp_directory_picker, null)
|
||||||
|
|
||||||
updateItems()
|
updateItems()
|
||||||
setupBreadcrumbs()
|
setupBreadcrumbs()
|
||||||
|
@@ -3,12 +3,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<selector>
|
<selector>
|
||||||
<item
|
<item
|
||||||
android:drawable="@color/activated_item_foreground"
|
android:drawable="@color/smtfp_activated_item_foreground"
|
||||||
android:state_activated="true"/>
|
android:state_activated="true"/>
|
||||||
</selector>
|
</selector>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<ripple android:color="@color/pressed_item_foreground">
|
<ripple android:color="@color/smtfp_pressed_item_foreground">
|
||||||
<item android:id="@android:id/mask">
|
<item android:id="@android:id/mask">
|
||||||
<color android:color="@android:color/white"/>
|
<color android:color="@android:color/white"/>
|
||||||
</item>
|
</item>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@color/pressed_item_foreground" android:state_pressed="true"/>
|
<item android:drawable="@color/smtfp_pressed_item_foreground" android:state_pressed="true"/>
|
||||||
<item android:drawable="@color/activated_item_foreground" android:state_activated="true"/>
|
<item android:drawable="@color/smtfp_activated_item_foreground" android:state_activated="true"/>
|
||||||
</selector>
|
</selector>
|
||||||
|
@@ -10,9 +10,9 @@
|
|||||||
android:id="@+id/about_holder"
|
android:id="@+id/about_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
android:paddingBottom="@dimen/smtfp_activity_margin"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingTop="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/about_website"
|
android:id="@+id/about_website"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/about_website"
|
android:layout_below="@+id/about_website"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/email_label"/>
|
android:text="@string/email_label"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/about_email_label"
|
android:layout_below="@+id/about_email_label"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
android:paddingBottom="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/email"/>
|
android:text="@string/email"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/about_email"
|
android:layout_below="@+id/about_email"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
android:paddingBottom="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/invite_friends_underlined"
|
android:text="@string/invite_friends_underlined"
|
||||||
android:textColor="@color/colorPrimary"/>
|
android:textColor="@color/colorPrimary"/>
|
||||||
|
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/about_invite"
|
android:layout_below="@+id/about_invite"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
android:paddingBottom="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/rate_us_underlined"
|
android:text="@string/rate_us_underlined"
|
||||||
android:textColor="@color/colorPrimary"/>
|
android:textColor="@color/colorPrimary"/>
|
||||||
|
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/about_rate_us"
|
android:layout_below="@+id/about_rate_us"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
android:paddingBottom="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/third_party_licences_underlined"
|
android:text="@string/third_party_licences_underlined"
|
||||||
android:textColor="@color/colorPrimary"/>
|
android:textColor="@color/colorPrimary"/>
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/about_license"
|
android:layout_below="@+id/about_license"
|
||||||
android:paddingBottom="@dimen/social_padding"
|
android:paddingBottom="@dimen/social_padding"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/follow_us"/>
|
android:text="@string/follow_us"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_below="@+id/about_gplus"
|
android:layout_below="@+id/about_gplus"
|
||||||
android:gravity="center_horizontal|bottom"
|
android:gravity="center_horizontal|bottom"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="v1.0\nCopyright © Simple Mobile Tools 2016"/>
|
android:text="v1.0\nCopyright © Simple Mobile Tools 2016"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="@dimen/activity_margin">
|
android:padding="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
android:id="@+id/license_butterknife_title"
|
android:id="@+id/license_butterknife_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/butterknife_title"
|
android:text="@string/butterknife_title"
|
||||||
android:textColor="@color/colorPrimary"/>
|
android:textColor="@color/colorPrimary"/>
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
android:id="@+id/breadcrumbs"
|
android:id="@+id/breadcrumbs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/activity_margin"/>
|
android:padding="@dimen/smtfp_activity_margin"/>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fragment_holder"
|
android:id="@+id/fragment_holder"
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/settings_padding"
|
android:layout_marginTop="@dimen/settings_padding"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:padding="@dimen/activity_margin">
|
android:padding="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_dark_theme_label"
|
android:id="@+id/settings_dark_theme_label"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/settings_padding"
|
android:layout_marginTop="@dimen/settings_padding"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:padding="@dimen/activity_margin">
|
android:padding="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_show_hidden_label"
|
android:id="@+id/settings_show_hidden_label"
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/settings_padding"
|
android:layout_marginTop="@dimen/settings_padding"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:padding="@dimen/activity_margin">
|
android:padding="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_show_full_path_label"
|
android:id="@+id/settings_show_full_path_label"
|
||||||
|
@@ -5,25 +5,25 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/smtfp_activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingTop="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/source_label"
|
android:id="@+id/source_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/source"
|
android:text="@string/source"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/source"
|
android:id="@+id/source"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
android:layout_marginBottom="@dimen/smtfp_activity_margin"
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/smtfp_activity_margin"
|
||||||
android:paddingRight="@dimen/small_margin"
|
android:paddingRight="@dimen/smtfp_small_margin"
|
||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/smtfp_small_margin"
|
||||||
android:text="source"/>
|
android:text="source"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -31,17 +31,17 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/destination"
|
android:text="@string/destination"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/destination"
|
android:id="@+id/destination"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
android:layout_marginBottom="@dimen/smtfp_activity_margin"
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/smtfp_activity_margin"
|
||||||
android:paddingBottom="@dimen/small_margin"
|
android:paddingBottom="@dimen/smtfp_small_margin"
|
||||||
android:paddingRight="@dimen/small_margin"
|
android:paddingRight="@dimen/smtfp_small_margin"
|
||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/smtfp_small_margin"
|
||||||
android:text="@string/smtfp_select_destination"/>
|
android:text="@string/smtfp_select_destination"/>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
android:id="@+id/dialog_radio_copy"
|
android:id="@+id/dialog_radio_copy"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/medium_margin"
|
android:layout_marginBottom="@dimen/smtfp_medium_margin"
|
||||||
android:text="@string/copy"/>
|
android:text="@string/copy"/>
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
|
@@ -5,15 +5,15 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/smtfp_activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingTop="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/item_name"
|
android:id="@+id/item_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
android:layout_marginBottom="@dimen/smtfp_activity_margin"
|
||||||
android:inputType="textCapSentences"
|
android:inputType="textCapSentences"
|
||||||
android:singleLine="true"/>
|
android:singleLine="true"/>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
android:id="@+id/dialog_radio_directory"
|
android:id="@+id/dialog_radio_directory"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/medium_margin"
|
android:layout_marginBottom="@dimen/smtfp_medium_margin"
|
||||||
android:text="@string/directory"/>
|
android:text="@string/directory"/>
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/directory_picker_breadcrumbs"
|
android:id="@+id/directory_picker_breadcrumbs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/activity_margin"/>
|
android:padding="@dimen/smtfp_activity_margin"/>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/directory_picker_list"
|
android:id="@+id/directory_picker_list"
|
||||||
|
@@ -5,83 +5,83 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/smtfp_activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/smtfp_activity_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingTop="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_name_label"
|
android:id="@+id/properties_name_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/name"
|
android:text="@string/name"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_name"
|
android:id="@+id/properties_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/small_margin"
|
android:padding="@dimen/smtfp_small_margin"
|
||||||
android:textColor="@android:color/black"/>
|
android:textColor="@android:color/black"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_path_label"
|
android:id="@+id/properties_path_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/path"
|
android:text="@string/path"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_path"
|
android:id="@+id/properties_path"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/small_margin"
|
android:padding="@dimen/smtfp_small_margin"
|
||||||
android:textColor="@android:color/black"/>
|
android:textColor="@android:color/black"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_size_label"
|
android:id="@+id/properties_size_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/size"
|
android:text="@string/size"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_size"
|
android:id="@+id/properties_size"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/small_margin"
|
android:padding="@dimen/smtfp_small_margin"
|
||||||
android:textColor="@android:color/black"/>
|
android:textColor="@android:color/black"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_last_modified_label"
|
android:id="@+id/properties_last_modified_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/last_modified"
|
android:text="@string/last_modified"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_last_modified"
|
android:id="@+id/properties_last_modified"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/small_margin"
|
android:padding="@dimen/smtfp_small_margin"
|
||||||
android:textColor="@android:color/black"/>
|
android:textColor="@android:color/black"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_files_count_label"
|
android:id="@+id/properties_files_count_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/smtfp_activity_margin"
|
||||||
android:text="@string/files_count"
|
android:text="@string/files_count"
|
||||||
android:textSize="@dimen/details_text_size"
|
android:textSize="@dimen/smtfp_details_text_size"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/properties_files_count"
|
android:id="@+id/properties_files_count"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/small_margin"
|
android:padding="@dimen/smtfp_small_margin"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:choiceMode="multipleChoiceModal"
|
android:choiceMode="multipleChoiceModal"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingLeft="@dimen/activity_margin"/>
|
android:paddingLeft="@dimen/smtfp_activity_margin"/>
|
||||||
|
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="@dimen/activity_margin"
|
android:layout_margin="@dimen/smtfp_activity_margin"
|
||||||
android:src="@mipmap/plus"/>
|
android:src="@mipmap/plus"/>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
@@ -3,21 +3,21 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:foreground="@drawable/selector">
|
android:foreground="@drawable/smtfp_selector">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/item_holder"
|
android:id="@+id/item_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingRight="@dimen/activity_margin">
|
android:paddingRight="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_icon"
|
android:id="@+id/item_icon"
|
||||||
android:layout_width="@dimen/icon_size"
|
android:layout_width="@dimen/smtfp_icon_size"
|
||||||
android:layout_height="@dimen/icon_size"
|
android:layout_height="@dimen/icon_size"
|
||||||
android:paddingBottom="@dimen/medium_margin"
|
android:paddingBottom="@dimen/smtfp_medium_margin"
|
||||||
android:paddingTop="@dimen/medium_margin"
|
android:paddingTop="@dimen/smtfp_medium_margin"
|
||||||
android:src="@mipmap/directory"/>
|
android:src="@mipmap/smtfp_directory"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/item_name"
|
android:id="@+id/item_name"
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
android:layout_toRightOf="@+id/item_icon"
|
android:layout_toRightOf="@+id/item_icon"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/smtfp_small_margin"
|
||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/smtfp_small_margin"
|
||||||
android:text="Directory"/>
|
android:text="Directory"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -37,9 +37,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/item_name"
|
android:layout_below="@+id/item_name"
|
||||||
android:layout_toRightOf="@+id/item_icon"
|
android:layout_toRightOf="@+id/item_icon"
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/smtfp_small_margin"
|
||||||
android:text="1 KB"
|
android:text="1 KB"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@@ -5,13 +5,13 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="@dimen/activity_margin">
|
android:padding="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/item_name"
|
android:id="@+id/item_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
android:layout_marginBottom="@dimen/smtfp_activity_margin"
|
||||||
android:inputType="textCapSentences"
|
android:inputType="textCapSentences"
|
||||||
android:singleLine="true"/>
|
android:singleLine="true"/>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
|
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
|
||||||
<item name="android:textSize">@dimen/normal_text_size</item>
|
<item name="android:textSize">@dimen/smtfp_normal_text_size</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.Dark" parent="Theme.AppCompat">
|
<style name="AppTheme.Dark" parent="Theme.AppCompat">
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
|
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
|
||||||
<item name="android:textSize">@dimen/normal_text_size</item>
|
<item name="android:textSize">@dimen/smtfp_normal_text_size</item>
|
||||||
<item name="android:windowBackground">@android:color/black</item>
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@@ -129,7 +129,7 @@ class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun addBreadcrumb(item: FileDirItem, addPrefix: Boolean) {
|
fun addBreadcrumb(item: FileDirItem, addPrefix: Boolean) {
|
||||||
val view = mInflater!!.inflate(R.layout.breadcrumb_item, null, false)
|
val view = mInflater!!.inflate(R.layout.smtfp_breadcrumb_item, null, false)
|
||||||
val textView = view.findViewById(R.id.breadcrumb_text) as TextView
|
val textView = view.findViewById(R.id.breadcrumb_text) as TextView
|
||||||
|
|
||||||
var textToAdd = item.name
|
var textToAdd = item.name
|
||||||
|
@@ -13,7 +13,7 @@ import com.simplemobiletools.filepicker.R
|
|||||||
import com.simplemobiletools.filepicker.extensions.formatSize
|
import com.simplemobiletools.filepicker.extensions.formatSize
|
||||||
import com.simplemobiletools.filepicker.extensions.getColoredIcon
|
import com.simplemobiletools.filepicker.extensions.getColoredIcon
|
||||||
import com.simplemobiletools.filepicker.models.FileDirItem
|
import com.simplemobiletools.filepicker.models.FileDirItem
|
||||||
import kotlinx.android.synthetic.main.list_item.view.*
|
import kotlinx.android.synthetic.main.smtfp_list_item.view.*
|
||||||
|
|
||||||
class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : BaseAdapter() {
|
class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : BaseAdapter() {
|
||||||
private val mInflater: LayoutInflater
|
private val mInflater: LayoutInflater
|
||||||
@@ -25,15 +25,15 @@ class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : Ba
|
|||||||
mInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
mInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||||
|
|
||||||
mRes = context.resources
|
mRes = context.resources
|
||||||
mDirectoryBmp = mRes.getColoredIcon(R.color.thumbnail_grey, R.mipmap.directory)
|
mDirectoryBmp = mRes.getColoredIcon(R.color.smtfp_thumbnail_grey, R.mipmap.directory)
|
||||||
mFileBmp = mRes.getColoredIcon(R.color.thumbnail_grey, R.mipmap.file)
|
mFileBmp = mRes.getColoredIcon(R.color.smtfp_thumbnail_grey, R.mipmap.file)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||||
var view = convertView
|
var view = convertView
|
||||||
val viewHolder: ViewHolder
|
val viewHolder: ViewHolder
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = mInflater.inflate(R.layout.list_item, parent, false)
|
view = mInflater.inflate(R.layout.smtfp_list_item, parent, false)
|
||||||
viewHolder = ViewHolder(view)
|
viewHolder = ViewHolder(view)
|
||||||
view!!.tag = viewHolder
|
view!!.tag = viewHolder
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,126 +0,0 @@
|
|||||||
package com.simplemobiletools.filepicker.dialogs
|
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.app.Dialog
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.support.v4.app.DialogFragment
|
|
||||||
import android.support.v7.app.AlertDialog
|
|
||||||
import android.view.View
|
|
||||||
import com.simplemobiletools.filepicker.R
|
|
||||||
import com.simplemobiletools.filepicker.adapters.ItemsAdapter
|
|
||||||
import com.simplemobiletools.filepicker.extensions.getFilenameFromPath
|
|
||||||
import com.simplemobiletools.filepicker.models.FileDirItem
|
|
||||||
import kotlinx.android.synthetic.main.directory_picker.view.*
|
|
||||||
import java.io.File
|
|
||||||
import java.util.*
|
|
||||||
import kotlin.comparisons.compareBy
|
|
||||||
|
|
||||||
class SelectFolderDialog : DialogFragment() {
|
|
||||||
val SELECT_FOLDER_REQUEST = 1
|
|
||||||
val SELECT_FOLDER_PATH = "path"
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
lateinit var mPath: String
|
|
||||||
var mFirstUpdate: Boolean = true
|
|
||||||
|
|
||||||
fun newInstance(path: String): SelectFolderDialog {
|
|
||||||
mPath = path
|
|
||||||
mFirstUpdate = true
|
|
||||||
return SelectFolderDialog()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lateinit var dialog: View
|
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
|
||||||
dialog = activity.layoutInflater.inflate(R.layout.directory_picker, null)
|
|
||||||
|
|
||||||
updateItems()
|
|
||||||
setupBreadcrumbs()
|
|
||||||
|
|
||||||
return AlertDialog.Builder(activity)
|
|
||||||
.setTitle(resources.getString(R.string.smtfp_select_destination))
|
|
||||||
.setView(dialog)
|
|
||||||
.setPositiveButton(R.string.smtfp_ok) { dialog, which -> sendResult() }
|
|
||||||
.setNegativeButton(R.string.smtfp_cancel, null)
|
|
||||||
.create()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun updateItems() {
|
|
||||||
var items = getItems(mPath)
|
|
||||||
if (!containsDirectory(items) && !mFirstUpdate) {
|
|
||||||
sendResult()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
items = items.sortedWith(compareBy({ !it.isDirectory }, { it.name }))
|
|
||||||
|
|
||||||
val adapter = ItemsAdapter(context, items)
|
|
||||||
dialog.directory_picker_list.adapter = adapter
|
|
||||||
//dialog.directory_picker_breadcrumbs.setInitialBreadcrumb(mPath)
|
|
||||||
dialog.directory_picker_list.setOnItemClickListener { adapterView, view, position, id ->
|
|
||||||
val item = items[position]
|
|
||||||
if (item.isDirectory) {
|
|
||||||
mPath = item.path
|
|
||||||
updateItems()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mFirstUpdate = false
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun sendResult() {
|
|
||||||
val intent = Intent()
|
|
||||||
intent.putExtra(SELECT_FOLDER_PATH, mPath)
|
|
||||||
targetFragment.onActivityResult(SELECT_FOLDER_REQUEST, Activity.RESULT_OK, intent)
|
|
||||||
dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupBreadcrumbs() {
|
|
||||||
/*dialog.directory_picker_breadcrumbs.setListener { id ->
|
|
||||||
val item = dialog.directory_picker_breadcrumbs.getChildAt(id).tag as FileDirItem
|
|
||||||
mPath = item.path
|
|
||||||
updateItems()
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getItems(path: String): List<FileDirItem> {
|
|
||||||
//val showHidden = Config.newInstance(context).showHidden
|
|
||||||
val items = ArrayList<FileDirItem>()
|
|
||||||
val base = File(path)
|
|
||||||
val files = base.listFiles()
|
|
||||||
if (files != null) {
|
|
||||||
for (file in files) {
|
|
||||||
if (!file.isDirectory)
|
|
||||||
continue
|
|
||||||
|
|
||||||
/* if (!showHidden && file.isHidden)
|
|
||||||
continue*/
|
|
||||||
|
|
||||||
val curPath = file.absolutePath
|
|
||||||
val curName = curPath.getFilenameFromPath()
|
|
||||||
val size = file.length()
|
|
||||||
|
|
||||||
items.add(FileDirItem(curPath, curName, file.isDirectory, getChildren(file), size))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return items
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getChildren(file: File): Int {
|
|
||||||
if (file.listFiles() == null || !file.isDirectory)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
return file.listFiles().size
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun containsDirectory(items: List<FileDirItem>): Boolean {
|
|
||||||
for (item in items) {
|
|
||||||
if (item.isDirectory) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
@@ -10,7 +10,7 @@ import android.view.WindowManager
|
|||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import com.simplemobiletools.filepicker.R
|
import com.simplemobiletools.filepicker.R
|
||||||
import com.simplemobiletools.filepicker.models.FileDirItem
|
import com.simplemobiletools.filepicker.models.FileDirItem
|
||||||
import kotlinx.android.synthetic.main.breadcrumb_item.view.*
|
import kotlinx.android.synthetic.main.smtfp_breadcrumb_item.view.*
|
||||||
|
|
||||||
class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context, attrs), View.OnClickListener {
|
class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context, attrs), View.OnClickListener {
|
||||||
private var mDeviceWidth: Int = 0
|
private var mDeviceWidth: Int = 0
|
||||||
@@ -130,7 +130,7 @@ class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun addBreadcrumb(item: FileDirItem, addPrefix: Boolean) {
|
fun addBreadcrumb(item: FileDirItem, addPrefix: Boolean) {
|
||||||
val view = mInflater!!.inflate(R.layout.breadcrumb_item, null, false)
|
val view = mInflater!!.inflate(R.layout.smtfp_breadcrumb_item, null, false)
|
||||||
|
|
||||||
var textToAdd = item.name
|
var textToAdd = item.name
|
||||||
if (addPrefix)
|
if (addPrefix)
|
||||||
|
@@ -3,12 +3,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<selector>
|
<selector>
|
||||||
<item
|
<item
|
||||||
android:drawable="@color/activated_item_foreground"
|
android:drawable="@color/smtfp_activated_item_foreground"
|
||||||
android:state_activated="true"/>
|
android:state_activated="true"/>
|
||||||
</selector>
|
</selector>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<ripple android:color="@color/pressed_item_foreground">
|
<ripple android:color="@color/smtfp_pressed_item_foreground">
|
||||||
<item android:id="@android:id/mask">
|
<item android:id="@android:id/mask">
|
||||||
<color android:color="@android:color/white"/>
|
<color android:color="@android:color/white"/>
|
||||||
</item>
|
</item>
|
@@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:drawable="@color/pressed_item_foreground" android:state_pressed="true"/>
|
|
||||||
<item android:drawable="@color/activated_item_foreground" android:state_activated="true"/>
|
|
||||||
</selector>
|
|
5
library/src/main/res/drawable/smtfp_selector.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@color/smtfp_pressed_item_foreground" android:state_pressed="true"/>
|
||||||
|
<item android:drawable="@color/smtfp_activated_item_foreground" android:state_activated="true"/>
|
||||||
|
</selector>
|
@@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/directory_picker_breadcrumbs"
|
android:id="@+id/directory_picker_breadcrumbs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/activity_margin"/>
|
android:padding="@dimen/smtfp_activity_margin"/>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
@@ -3,21 +3,21 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:foreground="@drawable/selector">
|
android:foreground="@drawable/smtfp_selector">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/item_holder"
|
android:id="@+id/item_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingRight="@dimen/activity_margin">
|
android:paddingRight="@dimen/smtfp_activity_margin">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_icon"
|
android:id="@+id/item_icon"
|
||||||
android:layout_width="@dimen/icon_size"
|
android:layout_width="@dimen/smtfp_icon_size"
|
||||||
android:layout_height="@dimen/icon_size"
|
android:layout_height="@dimen/smtfp_icon_size"
|
||||||
android:paddingBottom="@dimen/medium_margin"
|
android:paddingBottom="@dimen/smtfp_medium_margin"
|
||||||
android:paddingTop="@dimen/medium_margin"
|
android:paddingTop="@dimen/smtfp_medium_margin"
|
||||||
android:src="@mipmap/directory"/>
|
android:src="@mipmap/smtfp_directory"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/item_name"
|
android:id="@+id/item_name"
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
android:layout_toRightOf="@+id/item_icon"
|
android:layout_toRightOf="@+id/item_icon"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/smtfp_small_margin"
|
||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/smtfp_small_margin"
|
||||||
android:text="Directory"/>
|
android:text="Directory"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -37,9 +37,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/item_name"
|
android:layout_below="@+id/item_name"
|
||||||
android:layout_toRightOf="@+id/item_icon"
|
android:layout_toRightOf="@+id/item_icon"
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/smtfp_small_margin"
|
||||||
android:text="1 KB"
|
android:text="1 KB"
|
||||||
android:textSize="@dimen/details_text_size"/>
|
android:textSize="@dimen/smtfp_details_text_size"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
Before Width: | Height: | Size: 135 B After Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="thumbnail_grey">#33000000</color>
|
<color name="smtfp_thumbnail_grey">#33000000</color>
|
||||||
<color name="pressed_item_foreground">#08000000</color>
|
<color name="smtfp_pressed_item_foreground">#08000000</color>
|
||||||
<color name="activated_item_foreground">#44888888</color>
|
<color name="smtfp_activated_item_foreground">#44888888</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="activity_margin">16dp</dimen>
|
<dimen name="smtfp_activity_margin">16dp</dimen>
|
||||||
<dimen name="small_margin">6dp</dimen>
|
<dimen name="smtfp_small_margin">6dp</dimen>
|
||||||
<dimen name="medium_margin">10dp</dimen>
|
<dimen name="smtfp_medium_margin">10dp</dimen>
|
||||||
<dimen name="icon_size">48dp</dimen>
|
<dimen name="icon_size">48dp</dimen>
|
||||||
|
|
||||||
<dimen name="details_text_size">12sp</dimen>
|
<dimen name="smtfp_details_text_size">12sp</dimen>
|
||||||
<dimen name="normal_text_size">14sp</dimen>
|
<dimen name="smtfp_normal_text_size">14sp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|