Implemented Better Canteen Meals (Custom CardView)
This commit is contained in:
@@ -1,81 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.CardView android:id="@+id/card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/default_vertical_padding"
|
||||
android:paddingBottom="@dimen/default_vertical_padding"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout
|
||||
android:id="@+id/viewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/default_card_height"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/default_card_height"
|
||||
android:id="@+id/header"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!--<ImageButton
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/FUTheme.itemTitle"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:maxLines="1"
|
||||
android:maxLength="39"
|
||||
android:layout_toEndOf="@+id/icon"
|
||||
android:layout_toRightOf="@+id/icon" />
|
||||
<!-
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
-->
|
||||
|
||||
<ViewStub
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/headerStub"
|
||||
android:inflatedId="@+id/outerView"
|
||||
android:layout_toLeftOf="@id/arrow"
|
||||
android:layout_toStartOf="@id/arrow"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/arrow_down"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ViewStub
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/viewStub"
|
||||
android:inflatedId="@+id/innerView"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
52
app/src/main/res/layout/list_canteen_body.xml
Normal file
52
app/src/main/res/layout/list_canteen_body.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/FUTheme.itemValue"
|
||||
android:id="@+id/category"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/category"
|
||||
style="@style/FUTheme.itemValue"
|
||||
android:id="@+id/notes"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/ic_vegan"
|
||||
android:id="@+id/icon_vegan"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/ic_vegetarian"
|
||||
android:id="@+id/icon_vegetarian"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/ic_msc"
|
||||
android:id="@+id/icon_msc"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/ic_bio"
|
||||
android:id="@+id/icon_bio"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -2,7 +2,8 @@
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
app:title="Passengers"
|
||||
app:outer_view="@layout/list_canteen_header"
|
||||
app:inner_view="@layout/list_all_show_more"
|
||||
app:expandOnClick="true"
|
||||
app:inner_view="@layout/list_canteen_body"
|
||||
app:animationDuration="300"
|
||||
app:startExpanded="false" />
|
||||
app:startExpanded="true" />
|
||||
<!--
|
||||
|
||||
app:icon="@drawable/ic_event"
|
||||
|
||||
Reference in New Issue
Block a user