summaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authortom79 <tschneider.ac@gmail.com>2019-04-22 14:32:07 +0200
committertom79 <tschneider.ac@gmail.com>2019-04-22 14:32:07 +0200
commit94aba5f3a02fc695e56e5b0a9097aa66132acb9d (patch)
tree7a3f4308f7a359cdca6eb85abcf20a1c9ee543b6 /app/src/main/res/layout
parenta528d878e5c8fa1f3ade6b6db09c8777ff44a813 (diff)
Drag to move timelines
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/drawer_reorder.xml60
-rw-r--r--app/src/main/res/layout/fragment_reorder_tabs.xml32
2 files changed, 92 insertions, 0 deletions
diff --git a/app/src/main/res/layout/drawer_reorder.xml b/app/src/main/res/layout/drawer_reorder.xml
new file mode 100644
index 000000000..bb7a7d207
--- /dev/null
+++ b/app/src/main/res/layout/drawer_reorder.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright (C) 2015 Paul Burke
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/item"
+ android:layout_width="match_parent"
+ android:layout_height="?listPreferredItemHeight"
+ android:clickable="true"
+ android:focusable="true"
+ android:foreground="?selectableItemBackground">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="?listPreferredItemHeight"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical|left"
+ android:scaleType="center"
+ tools:ignore="RtlHardcoded" />
+
+ <TextView
+ android:id="@+id/text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="@dimen/activity_horizontal_margin"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <ImageView
+ android:id="@+id/hide"
+ android:layout_width="?listPreferredItemHeight"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical|right"
+ android:scaleType="center"
+ android:src="@drawable/ic_make_tab_unvisible"
+ android:contentDescription="@string/hide_timeline"
+ tools:ignore="RtlHardcoded" />
+
+ <ImageView
+ android:id="@+id/handle"
+ android:layout_width="?listPreferredItemHeight"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical|right"
+ android:scaleType="center"
+ android:src="@drawable/ic_drag_handle"
+ android:contentDescription="@string/move_timeline"
+ tools:ignore="RtlHardcoded" />
+</FrameLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_reorder_tabs.xml b/app/src/main/res/layout/fragment_reorder_tabs.xml
new file mode 100644
index 000000000..11b85bf93
--- /dev/null
+++ b/app/src/main/res/layout/fragment_reorder_tabs.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2019 Thomas Schneider
+
+ This file is a part of Mastalab
+
+ This program is free software; you can redistribute it and/or modify it under the terms of the
+ GNU General Public License as published by the Free Software Foundation; either version 3 of the
+ License, or (at your option) any later version.
+
+ Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with Mastalab; if not,
+ see <http://www.gnu.org/licenses>.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:paddingLeft="@dimen/fab_margin"
+ android:paddingRight="@dimen/fab_margin"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/lv_reorder_tabs"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="?attr/actionBarSize"
+ android:scrollbars="none"
+ >
+ </android.support.v7.widget.RecyclerView>
+</RelativeLayout>
+