WIP geobookmark detail graphic
This commit is contained in:
parent
fdb314c48b
commit
f21e5221ba
@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="deploymentTargetDropDown">
|
<component name="deploymentTargetDropDown">
|
||||||
<targetSelectedWithDropDown>
|
<runningDeviceTargetSelectedWithDropDown>
|
||||||
<Target>
|
<Target>
|
||||||
<type value="QUICK_BOOT_TARGET" />
|
<type value="RUNNING_DEVICE_TARGET" />
|
||||||
<deviceKey>
|
<deviceKey>
|
||||||
<Key>
|
<Key>
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
<type value="SERIAL_NUMBER" />
|
||||||
<value value="$USER_HOME$/.android/avd/Pixel_XL_API_30.avd" />
|
<value value="830cb6b6" />
|
||||||
</Key>
|
</Key>
|
||||||
</deviceKey>
|
</deviceKey>
|
||||||
</Target>
|
</Target>
|
||||||
</targetSelectedWithDropDown>
|
</runningDeviceTargetSelectedWithDropDown>
|
||||||
<timeTargetWasSelectedWithDropDown value="2021-09-14T16:48:49.750165Z" />
|
<timeTargetWasSelectedWithDropDown value="2021-09-15T13:58:51.175333Z" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -4,6 +4,7 @@
|
|||||||
<option name="filePathToZoomLevelMap">
|
<option name="filePathToZoomLevelMap">
|
||||||
<map>
|
<map>
|
||||||
<entry key="../../../../layout/custom_preview.xml" value="0.5661458333333333" />
|
<entry key="../../../../layout/custom_preview.xml" value="0.5661458333333333" />
|
||||||
|
<entry key="app/src/main/res/drawable/floating_semitransparent_button_background.xml" value="0.512962962962963" />
|
||||||
<entry key="app/src/main/res/drawable/ic_map_pin.xml" value="0.6425925925925926" />
|
<entry key="app/src/main/res/drawable/ic_map_pin.xml" value="0.6425925925925926" />
|
||||||
<entry key="app/src/main/res/layout/activity_geofavorite_detail.xml" value="0.4" />
|
<entry key="app/src/main/res/layout/activity_geofavorite_detail.xml" value="0.4" />
|
||||||
<entry key="app/src/main/res/layout/activity_list_view.xml" value="0.5307291666666667" />
|
<entry key="app/src/main/res/layout/activity_list_view.xml" value="0.5307291666666667" />
|
||||||
|
@ -280,6 +280,7 @@ public class GeofavoriteDetailActivity extends AppCompatActivity implements Loca
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateView(Geofavorite item) {
|
public void updateView(Geofavorite item) {
|
||||||
|
binding.collapsingToolbar.setTitle(item.getName() != null ? item.getName() : getString(R.string.new_geobookmark));
|
||||||
binding.nameEt.setText(item.getName());
|
binding.nameEt.setText(item.getName());
|
||||||
binding.descriptionEt.setText(item.getComment());
|
binding.descriptionEt.setText(item.getComment());
|
||||||
binding.createdTv.setText(new Date(item.getDateCreated() * 1000).toString());
|
binding.createdTv.setText(new Date(item.getDateCreated() * 1000).toString());
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:left="8dp"
|
||||||
|
android:right="8dp"
|
||||||
|
android:top="8dp"
|
||||||
|
android:bottom="8dp">
|
||||||
|
<shape
|
||||||
|
android:shape="oval">
|
||||||
|
<solid android:color="@color/defaultBrandAlpha"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -2,23 +2,32 @@
|
|||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/root">
|
android:id="@+id/root">
|
||||||
|
|
||||||
<ScrollView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="250dp"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<LinearLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:orientation="vertical"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
app:contentScrim="@color/defaultBrand"
|
||||||
|
app:layout_scrollFlags="scroll|snap|exitUntilCollapsed"
|
||||||
|
app:title="@string/new_geobookmark"
|
||||||
|
app:expandedTitleTextAppearance="@style/TextAppearance.GeofavoriteDetail.Header.Expanded"
|
||||||
|
app:collapsedTitleTextAppearance="@style/TextAppearance.GeofavoriteDetail.Header.Collapsed">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp">
|
android:layout_height="match_parent"
|
||||||
|
app:layout_collapseMode="parallax">
|
||||||
<org.osmdroid.views.MapView
|
<org.osmdroid.views.MapView
|
||||||
android:id="@+id/map"
|
android:id="@+id/map"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -31,39 +40,83 @@
|
|||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
app:contentInsetStart="0dp"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
|
android:background="@android:color/transparent">
|
||||||
|
|
||||||
|
<!-- Back button -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back_bt"
|
||||||
|
android:layout_width="?attr/actionBarSize"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:src="@drawable/ic_back_grey"
|
||||||
|
app:tint="@color/white"
|
||||||
|
android:background="@drawable/floating_semitransparent_button_background"/>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="20dp">
|
android:padding="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/accuracy_tv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:text="@string/accuracy"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:background="@android:color/darker_gray"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/name_et"
|
android:id="@+id/name_et"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:hint="@string/name"
|
android:hint="@string/name"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:ellipsize="end"/>
|
android:textColor="@color/defaultBrand"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
|
android:background="@android:color/transparent"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/description_et"
|
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:layout_marginTop="20dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:gravity="start|top"
|
android:gravity="start|top"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
android:lines="5"
|
|
||||||
android:maxLines="10"
|
android:maxLines="10"
|
||||||
android:hint="@string/description"
|
android:background="@android:color/transparent"
|
||||||
android:ellipsize="end" />
|
android:hint="@string/description"/>
|
||||||
|
|
||||||
<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="40dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:text="@string/created" />
|
android:text="@string/created" />
|
||||||
|
|
||||||
@ -112,16 +165,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAlignment="textEnd" />
|
android:textAlignment="textEnd" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/accuracy_tv"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:text="@string/accuracy"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:background="@android:color/darker_gray"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/submit_bt"
|
android:id="@+id/submit_bt"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
style="@style/Widget.AppCompat.Button.Colored"
|
||||||
@ -134,18 +177,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<!-- Back button -->
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
<ImageView
|
|
||||||
android:id="@+id/back_bt"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:src="@drawable/ic_back_grey"
|
|
||||||
app:tint="@color/white"
|
|
||||||
android:background="@color/defaultBrandAlpha"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
</layout>
|
</layout>
|
@ -20,6 +20,7 @@
|
|||||||
<style name="BaseTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
<style name="BaseTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/primary</item>
|
<item name="colorPrimary">@color/primary</item>
|
||||||
|
<!-- <item name="android:textColorPrimary">@color/white</item>-->
|
||||||
<item name="colorPrimaryDark">@color/primary</item>
|
<item name="colorPrimaryDark">@color/primary</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
<item name="android:actionModeBackground">?attr/colorPrimary</item>
|
<item name="android:actionModeBackground">?attr/colorPrimary</item>
|
||||||
@ -48,4 +49,15 @@
|
|||||||
<item name="android:background">?attr/colorPrimary</item>
|
<item name="android:background">?attr/colorPrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Geofavorite detail text appearances -->
|
||||||
|
|
||||||
|
<style name="TextAppearance.GeofavoriteDetail.Header.Expanded" parent="TextAppearance.Design.CollapsingToolbar.Expanded">
|
||||||
|
<item name="android:textSize">36sp</item>
|
||||||
|
<item name="android:textColor">@color/defaultBrand</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.GeofavoriteDetail.Header.Collapsed" parent="TextAppearance.AppCompat.Title">
|
||||||
|
<item name="android:textColor">@color/white</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user