mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Showing an overlay dialog when a nearby item is tapped
This commit is contained in:
parent
3a92de0c21
commit
cce8715fad
15 changed files with 609 additions and 79 deletions
97
app/src/main/res/layout/dialog_nearby_info.xml
Normal file
97
app/src/main/res/layout/dialog_nearby_info.xml
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
app:behavior_peekHeight="@dimen/bottom_peak_height">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:minHeight="@dimen/bottom_peak_height"
|
||||
android:background="@android:color/white"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/link_preview_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:minHeight="64dp">
|
||||
<TextView
|
||||
android:id="@+id/link_preview_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="4dp"
|
||||
android:textSize="20sp"
|
||||
android:fontFamily="serif"
|
||||
android:lineSpacingMultiplier="0.9"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:textColor="@android:color/black"
|
||||
tools:text="Lorem ipsum" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@android:color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/link_preview_extract"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textSize="16sp"
|
||||
android:lineSpacingMultiplier="1.3"
|
||||
android:textIsSelectable="true"
|
||||
android:textColor="@android:color/black"
|
||||
tools:text="Lorem ipsum"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/link_preview_bottom_padding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/link_preview_directions_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="GET DIRECTIONS"/>
|
||||
<TextView
|
||||
android:id="@+id/link_preview_go_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="READ ARTICLE"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -2,4 +2,5 @@
|
|||
<dimen name="icon_size">120dp</dimen>
|
||||
<dimen name="tiny_margin">4dp</dimen>
|
||||
<dimen name="small_margin">8dp</dimen>
|
||||
<dimen name="bottom_peak_height">240dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -45,4 +45,10 @@
|
|||
|
||||
<style name="ProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal" />
|
||||
|
||||
<style name="borderless_dialog">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue