mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-14 04:34:18 +02:00
various minor layout improvements
This commit is contained in:
@@ -217,6 +217,7 @@ public class DataEntryActivity extends Activity {
|
||||
if (!OpenScale.getInstance(this).getScaleDataList().isEmpty())
|
||||
{
|
||||
setViewMode(MeasurementView.MeasurementViewMode.ADD);
|
||||
txtDataNr.setText(DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT).format(new Date()));
|
||||
ScaleData lastScaleData = OpenScale.getInstance(this).getScaleDataList().get(0);
|
||||
|
||||
// show as default last scale data
|
||||
@@ -238,13 +239,23 @@ public class DataEntryActivity extends Activity {
|
||||
{
|
||||
switch (viewMode) {
|
||||
case VIEW:
|
||||
btnOk.setVisibility(View.VISIBLE);
|
||||
btnAdd.setVisibility(View.GONE);
|
||||
imageViewDelete.setVisibility(View.VISIBLE);
|
||||
btnLeft.setVisibility(View.VISIBLE);
|
||||
btnRight.setVisibility(View.VISIBLE);
|
||||
expandButton.setVisibility(View.VISIBLE);
|
||||
switchEditMode.setVisibility(View.VISIBLE);
|
||||
dateMeasurement.setVisibility(View.GONE);
|
||||
timeMeasurement.setVisibility(View.GONE);
|
||||
break;
|
||||
case EDIT:
|
||||
btnOk.setVisibility(View.VISIBLE);
|
||||
btnAdd.setVisibility(View.GONE);
|
||||
imageViewDelete.setVisibility(View.VISIBLE);
|
||||
btnLeft.setVisibility(View.VISIBLE);
|
||||
btnRight.setVisibility(View.VISIBLE);
|
||||
txtDataNr.setVisibility(View.VISIBLE);
|
||||
expandButton.setVisibility(View.VISIBLE);
|
||||
switchEditMode.setVisibility(View.VISIBLE);
|
||||
dateMeasurement.setVisibility(View.VISIBLE);
|
||||
timeMeasurement.setVisibility(View.VISIBLE);
|
||||
@@ -255,7 +266,7 @@ public class DataEntryActivity extends Activity {
|
||||
imageViewDelete.setVisibility(View.GONE);
|
||||
btnLeft.setVisibility(View.GONE);
|
||||
btnRight.setVisibility(View.GONE);
|
||||
txtDataNr.setVisibility(View.GONE);
|
||||
expandButton.setVisibility(View.GONE);
|
||||
switchEditMode.setVisibility(View.GONE);
|
||||
dateMeasurement.setVisibility(View.GONE);
|
||||
timeMeasurement.setVisibility(View.GONE);
|
||||
|
@@ -89,7 +89,8 @@
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/tableLayoutDataEntry"
|
||||
@@ -100,9 +101,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:gravity="bottom"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
|
@@ -1,25 +1,23 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp" >
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_weight="100">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtTitleGoal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:autoText="false"
|
||||
android:text="@string/label_title_goal"
|
||||
android:textSize="25dp"
|
||||
@@ -167,7 +165,6 @@
|
||||
android:id="@+id/txtTitleStatistics"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:autoText="false"
|
||||
android:text="@string/label_title_statistics"
|
||||
android:textSize="25dp"
|
||||
@@ -269,4 +266,4 @@
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
Reference in New Issue
Block a user