Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added no data elements
Browse files Browse the repository at this point in the history
deeppp15 committed Jan 28, 2025
1 parent c8eed3b commit 3e8189b
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ import com.google.gson.JsonObject
import io.realm.RealmResults
import io.realm.Sort
import org.ole.planet.myplanet.R
import org.ole.planet.myplanet.base.BaseRecyclerFragment
import org.ole.planet.myplanet.databinding.DialogAddReportBinding
import org.ole.planet.myplanet.databinding.FragmentReportsBinding
import org.ole.planet.myplanet.datamanager.DatabaseService
@@ -245,6 +246,7 @@ class ReportsFragment : BaseTeamFragment() {
//if the list is empty, makes the EXPORT CSV invisible
fragmentReportsBinding.exportCSV.visibility = View.GONE
Toast.makeText(requireContext(),"The list is empty", Toast.LENGTH_SHORT).show()
BaseRecyclerFragment.showNoData(fragmentReportsBinding.tvMessage, results.count(), "reports")
}
else {
fragmentReportsBinding.exportCSV.visibility = View.VISIBLE
11 changes: 11 additions & 0 deletions app/src/main/res/layout/fragment_reports.xml
Original file line number Diff line number Diff line change
@@ -54,4 +54,15 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ltButtons" />
<TextView
android:id="@+id/tvMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@color/daynight_textColor"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 3e8189b

Please sign in to comment.