Add test deck preview screen.

This commit is contained in:
kenkeiras 2018-01-21 12:05:54 +01:00
parent 8fa2e22d55
commit bd20e39785
18 changed files with 297 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.codigoparallevar.minicards.DeckPreviewActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_deck_preview" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/create_new_card_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@drawable/ic_add_black" />
</android.support.design.widget.CoordinatorLayout>

View file

@ -6,7 +6,7 @@
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.codigoparallevar.minicards.MainActivity">
tools:context="com.codigoparallevar.minicards.CardActivity">
<!--
<android.support.design.widget.AppBarLayout
@ -26,8 +26,9 @@
<com.codigoparallevar.minicards.CanvasView
android:id="@+id/canvasView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_width="383dp"
android:layout_height="match_parent"
tools:layout_editor_absoluteX="1dp" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/remove_part_fab"
@ -57,6 +58,14 @@
fab:fab_labelStyle="@style/menu_labels_style"
fab:fab_labelsPosition="left">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/show_deck_from_user_mode_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/white"
fab:fab_title="Show deck"
fab:fab_colorPressed="@color/white_pressed"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/set_developer_mode_button"
android:layout_width="wrap_content"
@ -102,6 +111,14 @@
fab:fab_title="Center view"
fab:fab_colorPressed="@color/white_pressed" />
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/show_deck_from_dev_mode_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/white"
fab:fab_title="Show deck"
fab:fab_colorPressed="@color/white_pressed"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/set_user_mode_button"
android:layout_width="wrap_content"

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/card_preview_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:minHeight="100dp"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="5dp"
card_view:cardCornerRadius="5dp"
card_view:cardPreventCornerOverlap="true"
card_view:cardUseCompatPadding="true"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="3dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/card_preview_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="TextView"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="3dp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</android.support.v7.widget.LinearLayoutCompat>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.codigoparallevar.minicards.DeckPreviewActivity"
tools:showIn="@layout/activity_deck_preview">
<ListView
android:id="@+id/card_deck_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
android:paddingTop="5dp"
android:dividerHeight="2dp" />
</android.support.constraint.ConstraintLayout>

View file

@ -1,3 +1,4 @@
<resources>
<string name="app_name">mini-cards</string>
<string name="title_activity_deck_preview">DeckPreviewActivity</string>
</resources>

View file

@ -13,4 +13,13 @@
<item name="android:background">@drawable/fab_label_background</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>