mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-23 16:53:04 +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);
|
btnLeftYear.setEnabled(selectedYear > firstYear);
|
||||||
btnRightYear.setEnabled(selectedYear < lastYear);
|
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
|
// show monthly diagram
|
||||||
if (prefs.getBoolean(String.valueOf(enableMonth.getId()), true)) {
|
if (prefs.getBoolean(String.valueOf(enableMonth.getId()), true)) {
|
||||||
chartTop.setVisibility(View.VISIBLE);
|
chartTop.setVisibility(View.VISIBLE);
|
||||||
|
@@ -182,6 +182,12 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
moveSubpageRight.setEnabled(selectedSubpageNr + 1 < subpageCount);
|
moveSubpageRight.setEnabled(selectedSubpageNr + 1 < subpageCount);
|
||||||
subpageView.addView(moveSubpageRight);
|
subpageView.addView(moveSubpageRight);
|
||||||
|
|
||||||
|
if (subpageCount <= 1) {
|
||||||
|
subpageView.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
subpageView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
tableHeaderView.removeAllViews();
|
tableHeaderView.removeAllViews();
|
||||||
|
|
||||||
for (MeasurementView measurement : measurementsList) {
|
for (MeasurementView measurement : measurementsList) {
|
||||||
|
@@ -18,8 +18,9 @@
|
|||||||
android:id="@+id/tableHeaderView"
|
android:id="@+id/tableHeaderView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
</LinearLayout>
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"></LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Reference in New Issue
Block a user