List updates when returning from add, fixes in edittexts
This commit is contained in:
parent
63f2ab9520
commit
cf24433d4d
@ -169,6 +169,13 @@ public class MainActivity extends AppCompatActivity implements MainView, OnSorti
|
||||
updateGridIcon(gridViewEnabled);
|
||||
|
||||
mApi = new ApiProvider(getApplicationContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
// Update list
|
||||
presenter.getGeofavorites();
|
||||
}
|
||||
|
||||
|
@ -8,83 +8,93 @@
|
||||
type="it.danieleverducci.nextcloudmaps.model.Geofavorite"/>
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/root"
|
||||
android:orientation="vertical"
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:padding="50dp"
|
||||
app:srcCompat="@drawable/ic_app"
|
||||
android:background="@color/defaultBrand" />
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/root">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/name_et"
|
||||
<ImageView
|
||||
android:id="@+id/map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/name"
|
||||
android:text="@{geofavorite.name}"/>
|
||||
android:layout_height="200dp"
|
||||
android:padding="50dp"
|
||||
app:srcCompat="@drawable/ic_app"
|
||||
android:background="@color/defaultBrand" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/description_et"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:inputType="textMultiLine"
|
||||
android:hint="@string/description"
|
||||
android:text="@{geofavorite.comment}" />
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/created" />
|
||||
<EditText
|
||||
android:id="@+id/name_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/name"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:text="@{geofavorite.name}"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/created_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="textEnd"
|
||||
app:formatDate="@{geofavorite.dateCreated}" />
|
||||
<EditText
|
||||
android:id="@+id/description_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:inputType="textMultiLine"
|
||||
android:hint="@string/description"
|
||||
android:ellipsize="end"
|
||||
android:text="@{geofavorite.comment}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/coords"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/created" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/coords_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="textEnd"
|
||||
android:text="@{geofavorite.lat +` °N, ` + geofavorite.lng + ` °E`}" />
|
||||
<TextView
|
||||
android:id="@+id/created_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="textEnd"
|
||||
app:formatDate="@{geofavorite.dateCreated}" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit_bt"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="50dp"
|
||||
android:text="@string/confirm"
|
||||
app:backgroundTint="@color/defaultBrand"
|
||||
android:onClick="onSubmit"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/coords"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/coords_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="textEnd"
|
||||
android:text="@{geofavorite.lat +` °N, ` + geofavorite.lng + ` °E`}" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit_bt"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="50dp"
|
||||
android:text="@string/confirm"
|
||||
app:backgroundTint="@color/defaultBrand"
|
||||
android:onClick="onSubmit"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
Loading…
Reference in New Issue
Block a user