add some folder pinning related things
|
@ -67,6 +67,16 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
|||
editDir()
|
||||
true
|
||||
}
|
||||
R.id.cab_pin -> {
|
||||
pinFolder()
|
||||
mode.finish()
|
||||
true
|
||||
}
|
||||
R.id.cab_unpin -> {
|
||||
unpinFolder()
|
||||
mode.finish()
|
||||
true
|
||||
}
|
||||
R.id.cab_hide -> {
|
||||
hideDirs()
|
||||
mode.finish()
|
||||
|
@ -163,6 +173,14 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
|||
listener?.refreshItems()
|
||||
}
|
||||
|
||||
private fun pinFolder() {
|
||||
|
||||
}
|
||||
|
||||
private fun unpinFolder() {
|
||||
|
||||
}
|
||||
|
||||
private fun displayCopyDialog() {
|
||||
val files = ArrayList<File>()
|
||||
val positions = multiSelector.selectedPositions
|
||||
|
|
|
@ -39,6 +39,10 @@ class Config private constructor(context: Context) {
|
|||
get() = mPrefs.getBoolean(SHOW_HIDDEN_FOLDERS, false)
|
||||
set(showHiddenFolders) = mPrefs.edit().putBoolean(SHOW_HIDDEN_FOLDERS, showHiddenFolders).apply()
|
||||
|
||||
var pinnedFolders: Set<String>
|
||||
get() = mPrefs.getStringSet(PINNED_FOLDERS, HashSet<String>())
|
||||
set(pinnedFolders) = mPrefs.edit().putStringSet(PINNED_FOLDERS, pinnedFolders).apply()
|
||||
|
||||
fun addHiddenDirectory(path: String) {
|
||||
val currHiddenFolders = HashSet<String>(hiddenFolders)
|
||||
currHiddenFolders.add(path)
|
||||
|
|
|
@ -12,6 +12,7 @@ val SHOW_HIDDEN_FOLDERS = "show_hidden_folders"
|
|||
val AUTOPLAY_VIDEOS = "autoplay_videos"
|
||||
val TREE_URI = "tree_uri"
|
||||
val DISPLAY_FILE_NAMES = "display_file_names"
|
||||
val PINNED_FOLDERS = "pinned_folders"
|
||||
|
||||
// sorting
|
||||
val SORT_BY_NAME = 1
|
||||
|
|
|
@ -8,6 +8,16 @@
|
|||
|
||||
<include layout="@layout/directory_tmb"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dir_pin"
|
||||
android:layout_width="@dimen/pin_size"
|
||||
android:layout_height="@dimen/pin_size"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="@dimen/small_padding"
|
||||
android:src="@mipmap/pin"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dir_shadow_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
android:id="@+id/play_outline"
|
||||
android:layout_width="@dimen/play_outline_size"
|
||||
android:layout_height="@dimen/play_outline_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="@dimen/tiny_margin"
|
||||
|
|
|
@ -6,6 +6,16 @@
|
|||
android:icon="@mipmap/info"
|
||||
android:title="@string/properties"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_pin"
|
||||
android:icon="@mipmap/pin"
|
||||
android:title="@string/pin_folder"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_unpin"
|
||||
android:icon="@mipmap/unpin"
|
||||
android:title="@string/unpin_folder"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_edit"
|
||||
android:icon="@mipmap/rename"
|
||||
|
|
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 649 B |
After Width: | Height: | Size: 664 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(versteckt)</string>
|
||||
<string name="save_as">Save as</string>
|
||||
<string name="file_saved">File saved successfully</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Kopieren</string>
|
||||
<string name="move">Verschieben</string>
|
||||
<string name="copy_move">Kopieren/Verschieben</string>
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(hidden)</string>
|
||||
<string name="save_as">Salvar como</string>
|
||||
<string name="file_saved">Archivo guardado con éxito</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="move">Move</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(nascosta)</string>
|
||||
<string name="save_as">Salva come </string>
|
||||
<string name="file_saved">File salvato correttamente</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Copia</string>
|
||||
<string name="move">Sposta</string>
|
||||
<string name="copy_move">Copia/Sposta</string>
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(非表示)</string>
|
||||
<string name="save_as">名前を付けて保存</string>
|
||||
<string name="file_saved">ファイルを正常に保存しました</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">コピー</string>
|
||||
<string name="move">移動</string>
|
||||
<string name="copy_move">コピー/移動</string>
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(oculta)</string>
|
||||
<string name="save_as">Guardar como</string>
|
||||
<string name="file_saved">Ficheiro guardado com sucesso</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Copiar</string>
|
||||
<string name="move">Mover</string>
|
||||
<string name="copy_move">Copiar/mover para</string>
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
<string name="hidden">(Скрытый)</string>
|
||||
<string name="save_as">Сохранить как</string>
|
||||
<string name="file_saved">Файл успешно сохранен</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Копировать</string>
|
||||
<string name="move">Переместить</string>
|
||||
<string name="copy_move">Копировать / Переместить</string>
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(hidden)</string>
|
||||
<string name="save_as">Save as</string>
|
||||
<string name="file_saved">File saved successfully</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Kopiera</string>
|
||||
<string name="move">Flytta</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<resources>
|
||||
<dimen name="dir_tmb_size">150dp</dimen>
|
||||
<dimen name="medium_tmb_size">120dp</dimen>
|
||||
<dimen name="pin_size">30dp</dimen>
|
||||
<dimen name="play_outline_size">60dp</dimen>
|
||||
<dimen name="play_outline_size_big">240dp</dimen>
|
||||
<dimen name="undo_padding">16dp</dimen>
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
<string name="hidden">(隐藏)</string>
|
||||
<string name="save_as">保存</string>
|
||||
<string name="file_saved">文件保存成功</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">复制</string>
|
||||
<string name="move">移动</string>
|
||||
<string name="copy_move">复制/移动</string>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<dimen name="medium_padding">8dp</dimen>
|
||||
<dimen name="dir_tmb_size">150dp</dimen>
|
||||
<dimen name="medium_tmb_size">100dp</dimen>
|
||||
<dimen name="pin_size">20dp</dimen>
|
||||
<dimen name="play_outline_size">40dp</dimen>
|
||||
<dimen name="play_outline_size_big">160dp</dimen>
|
||||
<dimen name="undo_padding">8dp</dimen>
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<string name="hidden">(hidden)</string>
|
||||
<string name="save_as">Save as</string>
|
||||
<string name="file_saved">File saved successfully</string>
|
||||
<string name="pin_folder">Pin folder</string>
|
||||
<string name="unpin_folder">Unpin folder</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="move">Move</string>
|
||||
<string name="copy_move">Copy/Move</string>
|
||||
|
|