Skip to content

Commit

Permalink
adding a Recents fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed May 18, 2021
1 parent 0f0d348 commit 27aa45f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.simplemobiletools.filemanager.pro.fragments

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.simplemobiletools.filemanager.pro.R

class RecentsFragment : Fragment() {
lateinit var mView: View

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
mView = inflater.inflate(R.layout.recents_fragment, container, false)!!
return mView
}
}
31 changes: 31 additions & 0 deletions app/src/main/res/layout/recents_fragment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/recents_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/recents_placeholder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:alpha="0.8"
android:gravity="center"
android:paddingStart="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:text="@string/no_items_found"
android:textSize="@dimen/bigger_text_size"
android:textStyle="italic"
android:visibility="gone" />

<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/recents_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:layoutAnimation="@anim/layout_animation"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyGridLayoutManager" />

</RelativeLayout>

0 comments on commit 27aa45f

Please sign in to comment.