mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Show path to upgrade to premium on feed chooser for free users
This commit is contained in:
parent
d5c54df51b
commit
0bb8b0c129
4 changed files with 21 additions and 6 deletions
|
@ -17,9 +17,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
|
@ -37,12 +37,24 @@
|
|||
android:id="@+id/text_sites"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/mute_config_sites"
|
||||
android:textColor="@color/positive"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_upgrade"
|
||||
style="?linkText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="36dp"
|
||||
android:padding="4dp"
|
||||
android:text="@string/mute_config_upgrade_to_premium"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ExpandableListView
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
app:showAsAction="never" />
|
||||
|
||||
<item android:id="@+id/menu_mute_sites"
|
||||
android:title="@string/mute_sites"
|
||||
android:title="@string/menu_mute_sites"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item android:id="@+id/menu_widget"
|
||||
|
|
|
@ -278,7 +278,8 @@
|
|||
|
||||
<string name="import_export">Import/Export…</string>
|
||||
<string name="settings">Preferences…</string>
|
||||
<string name="mute_sites">Mute Sites…</string>
|
||||
<string name="menu_mute_sites">Mute Sites…</string>
|
||||
<string name="mute_sites">Mute Sites</string>
|
||||
<string name="widget">Widget…</string>
|
||||
<string name="title_widget_setup">Tap to setup in NewsBlur</string>
|
||||
<string name="title_no_subscriptions">No active subscriptions detected</string>
|
||||
|
@ -322,6 +323,7 @@
|
|||
<string name="mute_config_title">You can follow up to 64 sites with a free standard account</string>
|
||||
<string name="mute_config_message">Please mute %d sites or reset to most popular sites.</string>
|
||||
<string name="mute_config_reset_button">RESET TO POPULAR SITES</string>
|
||||
<string name="mute_config_upgrade_to_premium">UPGRADE TO NEWSBLUR PREMIUM</string>
|
||||
<string name="mute_config_upgrade">UPGRADE</string>
|
||||
<string name="mute_config_sites">%1$s/%2$s</string>
|
||||
|
||||
|
|
|
@ -192,10 +192,11 @@ public class MuteConfig extends FeedChooser implements MuteConfigAdapter.FeedSta
|
|||
private void showSitesCount() {
|
||||
ViewGroup.LayoutParams oldLayout = binding.listView.getLayoutParams();
|
||||
FrameLayout.LayoutParams newLayout = new FrameLayout.LayoutParams(oldLayout);
|
||||
newLayout.topMargin = UIUtils.dp2px(this, 56);
|
||||
newLayout.topMargin = UIUtils.dp2px(this, 85);
|
||||
binding.listView.setLayoutParams(newLayout);
|
||||
binding.containerSitesCount.setVisibility(View.VISIBLE);
|
||||
binding.textResetSites.setOnClickListener(view -> resetToPopularFeeds());
|
||||
binding.textUpgrade.setOnClickListener(view -> openUpgradeToPremium());
|
||||
}
|
||||
|
||||
private void hideSitesCount() {
|
||||
|
|
Loading…
Add table
Reference in a new issue