mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 12:57:57 +01:00
Allow to create/remove categories. Some refactoring.
This commit is contained in:
26
app/src/main/res/layout/fragment_edit_categories.xml
Normal file
26
app/src/main/res/layout/fragment_edit_categories.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/categories_list"
|
||||
android:choiceMode="multipleChoice"
|
||||
android:listSelector="@color/list_choice_pressed_bg_light" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_action_add_18dp"
|
||||
app:borderWidth="0dp"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
39
app/src/main/res/layout/item_edit_categories.xml
Normal file
39
app/src/main/res/layout/item_edit_categories.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeightLarge"
|
||||
android:paddingTop="@dimen/margin_top"
|
||||
android:paddingBottom="@dimen/margin_bottom"
|
||||
android:background="@drawable/selector_chapter_light">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:elevation="4dp"
|
||||
android:clickable="true"
|
||||
android:layout_marginLeft="@dimen/margin_left"
|
||||
android:layout_marginStart="@dimen/margin_left"
|
||||
android:layout_marginRight="@dimen/margin_right"
|
||||
android:layout_marginEnd="@dimen/margin_right"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/margin_right"
|
||||
android:layout_marginEnd="@dimen/margin_right"
|
||||
android:layout_toRightOf="@id/image"
|
||||
android:layout_toEndOf="@id/image"
|
||||
android:layout_centerInParent="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/primary_text"
|
||||
tools:text="Title"/>
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user