Implemented Better Canteen Meals (Custom CardView)

This commit is contained in:
Caesar2011
2018-08-15 00:05:41 +02:00
parent 4a1fc3e28b
commit e04fe4ec5f
33 changed files with 287 additions and 316 deletions

View File

@@ -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>

View 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>

View File

@@ -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"

View File

@@ -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"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB