diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/RecentsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/RecentsFragment.kt index cf023f40..067e76f7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/RecentsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/RecentsFragment.kt @@ -4,12 +4,12 @@ import android.content.Context import android.provider.MediaStore import android.util.AttributeSet import androidx.recyclerview.widget.GridLayoutManager +import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.getLongValue import com.simplemobiletools.commons.extensions.getStringValue import com.simplemobiletools.commons.helpers.VIEW_TYPE_GRID import com.simplemobiletools.commons.helpers.VIEW_TYPE_LIST import com.simplemobiletools.commons.helpers.ensureBackgroundThread -import com.simplemobiletools.commons.helpers.mydebug import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.commons.views.MyGridLayoutManager import com.simplemobiletools.filemanager.pro.activities.SimpleActivity @@ -17,7 +17,6 @@ import com.simplemobiletools.filemanager.pro.adapters.ItemsAdapter import com.simplemobiletools.filemanager.pro.extensions.config import com.simplemobiletools.filemanager.pro.interfaces.ItemOperationsListener import com.simplemobiletools.filemanager.pro.models.ListItem -import kotlinx.android.synthetic.main.items_fragment.view.* import kotlinx.android.synthetic.main.recents_fragment.view.* import java.util.* @@ -35,6 +34,8 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage ensureBackgroundThread { getRecents { recents -> recents_swipe_refresh?.isRefreshing = false + recents_list.beVisibleIf(recents.isNotEmpty()) + recents_placeholder.beVisibleIf(recents.isEmpty()) addItems(recents, false) if (context != null && currentViewType != context!!.config.getFolderViewType(currentPath)) { diff --git a/app/src/main/res/layout/recents_fragment.xml b/app/src/main/res/layout/recents_fragment.xml index 534e9803..21a8c3ce 100644 --- a/app/src/main/res/layout/recents_fragment.xml +++ b/app/src/main/res/layout/recents_fragment.xml @@ -10,6 +10,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" + android:layout_marginTop="@dimen/activity_margin" android:alpha="0.8" android:gravity="center" android:paddingStart="@dimen/activity_margin"