apps-android-commons/app/src/main/res/layout/nearby_card_view.xml
Shashwat Kedia e5c789e874
Resolves #2239 by adding a compass arrow for direction of nearest item (#5433)
* Resolves issue #2239 by adding an arrow for direction

* Removed unnecessary change in styles.xml

* spacing

* javadoc

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-01-15 13:57:44 +09:00

107 lines
No EOL
4 KiB
XML

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerVertical="true"
android:background="@drawable/card_border"
android:minHeight="@dimen/large_height"
android:padding="@dimen/small_gap"
>
<Button
android:id="@+id/permission_request_button"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginRight="@dimen/activity_margin_horizontal"
android:contentDescription="@string/display_nearby_notification_summary"
android:minWidth="@dimen/fragment_height"
android:singleLine="true"
android:text="@string/display_nearby_notification_summary"
android:textColor="?attr/card_item_color"
android:theme="?attr/mainScreenNearbyPermissionbutton" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/content_layout"
android:layout_centerInParent="true"
android:orientation="horizontal"
>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/progressBar"
android:layout_centerInParent="true"
/>
<ImageView
android:id="@+id/nearby_icon"
android:layout_width="@dimen/dimen_40"
android:layout_height="@dimen/dimen_40"
android:layout_marginLeft="@dimen/standard_gap"
android:layout_marginStart="@dimen/standard_gap"
android:scaleType="centerCrop"
app:srcCompat="@drawable/ic_location_white_24dp"
android:tint="?attr/card_item_color"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:weightSum="4"
>
<TextView
android:id="@+id/nearby_title"
android:layout_width="@dimen/dimen_0"
android:layout_height="wrap_content"
android:layout_weight="3"
android:layout_centerInParent="true"
android:layout_marginLeft="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
tools:text="test distance"
android:textColor="?attr/card_item_color"
android:singleLine="true"
>
</TextView>
<TextView
android:id="@+id/nearby_distance"
android:layout_width="@dimen/dimen_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="@dimen/standard_gap"
android:layout_marginRight="@dimen/standard_gap"
android:minWidth="@dimen/fragment_height"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
tools:text="test distance"
android:textColor="?attr/card_item_color"
android:singleLine="true"
>
</TextView>
<ImageView
android:id="@+id/nearby_compass"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="16dp"
app:srcCompat="@drawable/baseline_arrow_upward_24"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>