mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-23 08:43:15 +02:00
show navigation buttons only if you need them.
This commit is contained in:
@@ -506,6 +506,14 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
||||
btnLeftYear.setEnabled(selectedYear > firstYear);
|
||||
btnRightYear.setEnabled(selectedYear < lastYear);
|
||||
|
||||
if (selectedYear == firstYear && selectedYear == lastYear) {
|
||||
btnLeftYear.setVisibility(View.GONE);
|
||||
btnRightYear.setVisibility(View.GONE);
|
||||
} else {
|
||||
btnLeftYear.setVisibility(View.VISIBLE);
|
||||
btnRightYear.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// show monthly diagram
|
||||
if (prefs.getBoolean(String.valueOf(enableMonth.getId()), true)) {
|
||||
chartTop.setVisibility(View.VISIBLE);
|
||||
|
@@ -182,6 +182,12 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
||||
moveSubpageRight.setEnabled(selectedSubpageNr + 1 < subpageCount);
|
||||
subpageView.addView(moveSubpageRight);
|
||||
|
||||
if (subpageCount <= 1) {
|
||||
subpageView.setVisibility(View.GONE);
|
||||
} else {
|
||||
subpageView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
tableHeaderView.removeAllViews();
|
||||
|
||||
for (MeasurementView measurement : measurementsList) {
|
||||
|
@@ -18,8 +18,9 @@
|
||||
android:id="@+id/tableHeaderView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
</LinearLayout>
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"></LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Reference in New Issue
Block a user