diff options
author | emasty <emasty@gmail.com> | 2020-01-04 20:27:48 +0300 |
---|---|---|
committer | emasty <emasty@gmail.com> | 2020-01-05 16:28:57 +0300 |
commit | 00800771333fa6d07e15d7ff15cffcfcef58443d (patch) | |
tree | c4d25c725a84bbf36d9161e17b8b77e2bad5d56f /News-Android-App/src/main/res/layout | |
parent | b406acdbafdbff30cb84f2a51790d905011dd151 (diff) |
Added fast actions for NewsDetailActivity
Signed-off-by: emasty <emasty@gmail.com>
Diffstat (limited to 'News-Android-App/src/main/res/layout')
-rw-r--r-- | News-Android-App/src/main/res/layout/activity_news_detail.xml | 57 | ||||
-rw-r--r-- | News-Android-App/src/main/res/layout/widget_fastactions_detailview.xml | 54 |
2 files changed, 90 insertions, 21 deletions
diff --git a/News-Android-App/src/main/res/layout/activity_news_detail.xml b/News-Android-App/src/main/res/layout/activity_news_detail.xml index f3ed69cf..e4037486 100644 --- a/News-Android-App/src/main/res/layout/activity_news_detail.xml +++ b/News-Android-App/src/main/res/layout/activity_news_detail.xml @@ -21,30 +21,46 @@ for bottom toolbar, replace marginTop above with marginBottom android:layout_marginBottom="?attr/actionBarSize" --> - - <androidx.viewpager.widget.ViewPager - android:id="@+id/pager" + <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".NewsDetailActivity" > + > + <androidx.viewpager.widget.ViewPager + android:id="@+id/pager" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".NewsDetailActivity" > + <!-- + This title strip will display the currently visible page title, as well as the page + titles for adjacent pages. + --> - <!-- - This title strip will display the currently visible page title, as well as the page - titles for adjacent pages. - --> + <!-- + <android.support.v4.view.PagerTitleStrip + android:id="@+id/pager_title_strip" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:background="#33b5e5" + android:paddingBottom="4dp" + android:paddingTop="4dp" + android:textColor="#fff" /> + --> - <!-- - <android.support.v4.view.PagerTitleStrip - android:id="@+id/pager_title_strip" - android:layout_width="match_parent" + + </androidx.viewpager.widget.ViewPager> + + <include + android:id="@+id/fa_detail_bar" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="top" - android:background="#33b5e5" - android:paddingBottom="4dp" - android:paddingTop="4dp" - android:textColor="#fff" /> - --> - </androidx.viewpager.widget.ViewPager> + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:layout_marginBottom="11dp" + android:layout_marginEnd="11dp" + layout="@layout/widget_fastactions_detailview" /> + + </RelativeLayout> <FrameLayout android:id="@+id/podcast_frame" @@ -71,8 +87,7 @@ android:theme="@style/ToolbarTheme" app:popupTheme="@style/ToolbarOptionMenuBackgroundTheme"> </com.google.android.material.bottomappbar.BottomAppBar> - --> - +--> <include android:id="@+id/toolbar_layout" diff --git a/News-Android-App/src/main/res/layout/widget_fastactions_detailview.xml b/News-Android-App/src/main/res/layout/widget_fastactions_detailview.xml new file mode 100644 index 00000000..b1bb6332 --- /dev/null +++ b/News-Android-App/src/main/res/layout/widget_fastactions_detailview.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:background="@drawable/fa_bg" + android:orientation="horizontal" + android:animateLayoutChanges="true"> + + <androidx.appcompat.widget.AppCompatImageButton + android:id="@+id/fa_toggle" + android:layout_width="56dp" + android:layout_height="56dp" + android:background="?android:attr/selectableItemBackground" + android:src="@drawable/ic_fa_expand" /> + + <LinearLayout + android:id="@+id/fa_collapse_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/fa_toggle" + android:visibility="gone"> + + <androidx.appcompat.widget.AppCompatImageButton + android:id="@+id/fa_mark_as_read" + android:layout_width="56dp" + android:layout_height="56dp" + android:background="?android:attr/selectableItemBackground" + android:src="@drawable/ic_check_box_outline_blank_white" /> + + <androidx.appcompat.widget.AppCompatImageButton + android:id="@+id/fa_star" + android:layout_width="56dp" + android:layout_height="56dp" + android:background="?android:attr/selectableItemBackground" + android:src="@drawable/ic_action_star_border_dark" /> + + <androidx.appcompat.widget.AppCompatImageButton + android:id="@+id/fa_share" + android:layout_width="56dp" + android:layout_height="56dp" + android:background="?android:attr/selectableItemBackground" + app:srcCompat="@drawable/ic_share_white" /> + </LinearLayout> + + <androidx.appcompat.widget.AppCompatImageButton + android:id="@+id/fa_open_in_browser" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_toRightOf="@id/fa_collapse_layout" + android:background="@drawable/fa_button" + android:src="@drawable/ic_action_open_in_browser" + android:translationZ="50dp" /> +</RelativeLayout>
\ No newline at end of file |