142 lines
6.3 KiB
XML
142 lines
6.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Pupil, Hitomi.la viewer for Android
|
|
~ Copyright (C) 2020 tom5079
|
|
~
|
|
~ 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.
|
|
~
|
|
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
-->
|
|
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".ui.MainActivity">
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:id="@+id/main_appbar_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@color/transparent"
|
|
android:visibility="invisible"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintLeft_toLeftOf="parent">
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="64dp"
|
|
android:visibility="invisible"
|
|
android:background="@color/transparent"
|
|
app:layout_scrollFlags="scroll|enterAlways"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<androidx.core.widget.ContentLoadingProgressBar
|
|
style="?android:attr/progressBarStyle"
|
|
android:id="@+id/main_progressbar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:indeterminate="true"/>
|
|
|
|
<TextView
|
|
android:id="@+id/main_noresult"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:text="@string/main_no_result"
|
|
android:visibility="invisible"/>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/main_recyclerview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:paddingTop="64dp"
|
|
android:clipToPadding="false"
|
|
app:fastScrollEnabled="true"
|
|
app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
|
|
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
|
|
app:fastScrollHorizontalTrackDrawable="@drawable/track_drawable"
|
|
app:fastScrollVerticalTrackDrawable="@drawable/track_drawable"
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
|
|
|
<com.github.clans.fab.FloatingActionMenu
|
|
android:id="@+id/main_fab"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom|end"
|
|
android:layout_margin="16dp"
|
|
app:menu_colorNormal="@color/colorAccent">
|
|
|
|
<com.github.clans.fab.FloatingActionButton
|
|
android:id="@+id/main_fab_cancel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:fab_label="@string/main_fab_cancel"
|
|
app:fab_size="mini"/>
|
|
|
|
<com.github.clans.fab.FloatingActionButton
|
|
android:id="@+id/main_fab_jump"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:fab_label="@string/main_jump_title"
|
|
app:fab_size="mini"/>
|
|
|
|
<com.github.clans.fab.FloatingActionButton
|
|
android:id="@+id/main_fab_random"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:fab_label="@string/main_fab_random"
|
|
app:fab_size="mini"/>
|
|
|
|
<com.github.clans.fab.FloatingActionButton
|
|
android:id="@+id/main_fab_id"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:fab_label="@string/main_open_gallery_by_id"
|
|
app:fab_size="mini"/>
|
|
|
|
</com.github.clans.fab.FloatingActionMenu>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|
|
<com.arlib.floatingsearchview.FloatingSearchViewDayNight
|
|
android:id="@+id/main_searchview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:floatingSearch_backgroundColor="?android:attr/colorBackgroundFloating"
|
|
app:floatingSearch_leftActionColor="?attr/colorControlNormal"
|
|
app:floatingSearch_menuItemIconColor="?attr/colorControlNormal"
|
|
app:floatingSearch_actionMenuOverflowColor="?attr/colorControlNormal"
|
|
app:floatingSearch_clearBtnColor="?attr/colorControlNormal"
|
|
app:floatingSearch_viewTextColor="?android:attr/textColorPrimary"
|
|
app:floatingSearch_suggestionRightIconColor="@color/material_orange_500"
|
|
app:floatingSearch_searchBarMarginLeft="8dp"
|
|
app:floatingSearch_searchBarMarginRight="8dp"
|
|
app:floatingSearch_searchBarMarginTop="8dp"
|
|
app:floatingSearch_searchHint="@string/search_hint"
|
|
app:floatingSearch_suggestionsListAnimDuration="250"
|
|
app:floatingSearch_showSearchKey="true"
|
|
app:floatingSearch_leftActionMode="showHamburger"
|
|
app:floatingSearch_menu="@menu/main"
|
|
app:floatingSearch_dismissOnOutsideTouch="true"
|
|
app:floatingSearch_close_search_on_keyboard_dismiss="true"
|
|
tools:ignore="NewApi" />
|
|
|
|
</RelativeLayout> |