File tree Expand file tree Collapse file tree 12 files changed +18
-4
lines changed
kotlin/com/simplemobiletools/filemanager/activities Expand file tree Collapse file tree 12 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.simplemobiletools.filemanager.activities
22
33import android.graphics.PorterDuff
44import android.os.Bundle
5+ import com.simplemobiletools.commons.extensions.beVisibleIf
56import com.simplemobiletools.filemanager.R
67import com.simplemobiletools.filemanager.extensions.config
78import kotlinx.android.synthetic.main.activity_favorites.*
@@ -16,18 +17,20 @@ class FavoritesActivity : SimpleActivity() {
1617
1718 private fun updateFavorites () {
1819 favorites_holder.removeAllViews()
19- val folders = config.favorites
20+ val favorites = config.favorites
21+ favorites_placeholder.beVisibleIf(favorites.isEmpty())
22+ favorites_placeholder.setTextColor(config.textColor)
2023
21- for (folder in folders ) {
24+ for (favorite in favorites ) {
2225 layoutInflater.inflate(R .layout.item_favorite, null , false ).apply {
2326 favorite_title.apply {
24- text = folder
27+ text = favorite
2528 setTextColor(config.textColor)
2629 }
2730 favorite_icon.apply {
2831 setColorFilter(config.textColor, PorterDuff .Mode .SRC_IN )
2932 setOnClickListener {
30- config.removeFavorite(folder )
33+ config.removeFavorite(favorite )
3134 updateFavorites()
3235 }
3336 }
Original file line number Diff line number Diff line change 2424 android : paddingLeft =" @dimen/big_margin"
2525 android : paddingRight =" @dimen/big_margin"
2626 android : paddingTop =" @dimen/activity_margin"
27+ android : text =" @string/favorites_activity_placeholder"
2728 android : visibility =" gone" />
2829 </RelativeLayout >
2930</ScrollView >
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Remove from favorites</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Remove from favorites</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Enlever des favoris</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Remove from favorites</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Remove from favorites</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Remover dos favoritos</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Убрать из избранного</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
Original file line number Diff line number Diff line change 1414 <string name =" remove_from_favorites" >Ta bort från favoriter</string >
1515 <string name =" manage_favorites" >Manage favorites</string >
1616 <string name =" go_to_favorite" >Go to favorite</string >
17+ <string name =" favorites_activity_placeholder" >You can add frequently used folders to favorites for easy access from anywhere.</string >
1718
1819 <!-- Strings displayed only on Google Playstore. Optional, but good to have -->
1920 <!-- Short description has to have less than 80 chars -->
You can’t perform that action at this time.
0 commit comments