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