mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
#1600 Mark story as read button width
This commit is contained in:
parent
2a747b6782
commit
95b80fb645
4 changed files with 26 additions and 26 deletions
|
@ -211,17 +211,6 @@
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:scrollbars="none" />
|
android:scrollbars="none" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/mark_read_story_button"
|
|
||||||
style="?storyButtons"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:layout_marginHorizontal="31dp"
|
|
||||||
android:layout_marginTop="15dp"
|
|
||||||
android:layout_marginBottom="-15dp"
|
|
||||||
android:text="@string/story_mark_read_state"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<include layout="@layout/reading_item_actions" />
|
<include layout="@layout/reading_item_actions" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -2,26 +2,39 @@
|
||||||
<merge xmlns:app="http://schemas.android.com/apk/res-auto"
|
<merge xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:layout_marginBottom="15dp"
|
android:layout_marginBottom="15dp"
|
||||||
android:baselineAligned="false" >
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_gravity="center_horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/mark_read_story_button"
|
||||||
|
style="?storyButtons"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_alignStart="@+id/train_story_button"
|
||||||
|
android:layout_alignEnd="@+id/save_story_button"
|
||||||
|
android:text="@string/story_mark_read_state"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/train_story_button"
|
android:id="@+id/train_story_button"
|
||||||
style="?storyButtons"
|
style="?storyButtons"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
|
android:layout_below="@+id/mark_read_story_button"
|
||||||
android:text="@string/train_this"
|
android:text="@string/train_this"
|
||||||
app:icon="@drawable/ic_train"/>
|
app:icon="@drawable/ic_train" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/share_story_button"
|
android:id="@+id/share_story_button"
|
||||||
style="?storyButtons"
|
style="?storyButtons"
|
||||||
|
android:layout_marginHorizontal="12dp"
|
||||||
|
android:layout_toEndOf="@+id/train_story_button"
|
||||||
|
android:layout_below="@+id/mark_read_story_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:text="@string/share_this"
|
android:text="@string/share_this"
|
||||||
|
@ -30,12 +43,14 @@
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/save_story_button"
|
android:id="@+id/save_story_button"
|
||||||
style="?storyButtons"
|
style="?storyButtons"
|
||||||
|
android:layout_toEndOf="@+id/share_story_button"
|
||||||
|
android:layout_below="@+id/mark_read_story_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:text="@string/save_this"
|
android:text="@string/save_this"
|
||||||
app:icon="@drawable/ic_clock" />
|
app:icon="@drawable/ic_clock" />
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -184,8 +184,6 @@
|
||||||
|
|
||||||
<style name="storyButtons" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
<style name="storyButtons" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||||
<item name="android:textSize">14sp</item>
|
<item name="android:textSize">14sp</item>
|
||||||
<item name="android:layout_marginLeft">8dp</item>
|
|
||||||
<item name="android:layout_marginRight">8dp</item>
|
|
||||||
<item name="android:textColor">@color/gray75</item>
|
<item name="android:textColor">@color/gray75</item>
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
<item name="android:letterSpacing">0</item>
|
<item name="android:letterSpacing">0</item>
|
||||||
|
@ -195,8 +193,6 @@
|
||||||
</style>
|
</style>
|
||||||
<style name="storyButtons.dark" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
<style name="storyButtons.dark" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||||
<item name="android:textSize">14sp</item>
|
<item name="android:textSize">14sp</item>
|
||||||
<item name="android:layout_marginLeft">8dp</item>
|
|
||||||
<item name="android:layout_marginRight">8dp</item>
|
|
||||||
<item name="android:textColor">@color/gray46</item>
|
<item name="android:textColor">@color/gray46</item>
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
<item name="android:letterSpacing">0</item>
|
<item name="android:letterSpacing">0</item>
|
||||||
|
|
|
@ -175,7 +175,7 @@ class ReadingItemFragment : NbFragment(), PopupMenu.OnMenuItemClickListener {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
binding.storyContextMenuButton.setOnClickListener { onClickMenuButton() }
|
binding.storyContextMenuButton.setOnClickListener { onClickMenuButton() }
|
||||||
binding.markReadStoryButton.setOnClickListener { clickMarkStoryRead() }
|
readingItemActionsBinding.markReadStoryButton.setOnClickListener { clickMarkStoryRead() }
|
||||||
readingItemActionsBinding.trainStoryButton.setOnClickListener { clickTrain() }
|
readingItemActionsBinding.trainStoryButton.setOnClickListener { clickTrain() }
|
||||||
readingItemActionsBinding.saveStoryButton.setOnClickListener { clickSave() }
|
readingItemActionsBinding.saveStoryButton.setOnClickListener { clickSave() }
|
||||||
readingItemActionsBinding.shareStoryButton.setOnClickListener { clickShare() }
|
readingItemActionsBinding.shareStoryButton.setOnClickListener { clickShare() }
|
||||||
|
@ -343,10 +343,10 @@ class ReadingItemFragment : NbFragment(), PopupMenu.OnMenuItemClickListener {
|
||||||
|
|
||||||
private fun updateMarkReadButton() {
|
private fun updateMarkReadButton() {
|
||||||
if (markStoryReadBehavior == MarkStoryReadBehavior.MANUALLY) {
|
if (markStoryReadBehavior == MarkStoryReadBehavior.MANUALLY) {
|
||||||
binding.markReadStoryButton.visibility = View.VISIBLE
|
readingItemActionsBinding.markReadStoryButton.visibility = View.VISIBLE
|
||||||
binding.markReadStoryButton.setStoryReadState(requireContext(), story!!.read)
|
readingItemActionsBinding.markReadStoryButton.setStoryReadState(requireContext(), story!!.read)
|
||||||
} else {
|
} else {
|
||||||
binding.markReadStoryButton.visibility = View.GONE
|
readingItemActionsBinding.markReadStoryButton.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue