Skip to content

Commit 337af9e

Browse files
Matthew KevinsMatthew Kevins
authored andcommitted
Use badge button without linearlayout
This resolves an issue where the button did not open the bottomsheet in dark mode.
1 parent 7b4ffee commit 337af9e

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

WordPress/src/main/java/org/wordpress/android/ui/publicize/PublicizeListFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
136136
}
137137

138138
if (mJetpackBrandingUtils.shouldShowJetpackBranding()) {
139-
View jetpackBadge = rootView.findViewById(R.id.jetpack_badge_sharing);
139+
View jetpackBadge = rootView.findViewById(R.id.jetpack_powered_badge);
140140
jetpackBadge.setVisibility(View.VISIBLE);
141141

142142
if (mJetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {

WordPress/src/main/res/layout/publicize_list_fragment.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,26 @@
113113

114114
</RelativeLayout>
115115

116-
<include
117-
android:id="@+id/jetpack_badge_sharing"
118-
layout="@layout/jetpack_badge"
116+
<com.google.android.material.button.MaterialButton
117+
android:id="@+id/jetpack_powered_badge"
119118
android:visibility="gone"
120-
android:layout_width="match_parent"
119+
android:layout_width="wrap_content"
121120
android:layout_height="wrap_content"
121+
android:layout_gravity="center"
122+
android:importantForAccessibility="no"
123+
android:paddingEnd="15dp"
124+
android:paddingStart="5dp"
125+
android:paddingVertical="5dp"
126+
android:text="@string/wp_jetpack_powered"
127+
android:textAppearance="?attr/textAppearanceBody1"
128+
android:textColor="@color/white"
129+
android:textSize="@dimen/text_sz_large"
130+
app:backgroundTint="@color/jetpack_badge_background"
131+
app:cornerRadius="20dp"
132+
app:icon="@drawable/ic_jetpack_logo_24dp"
133+
app:iconPadding="10dp"
134+
app:iconTint="@null"
135+
tools:ignore="TextContrastCheck"
122136
tools:visibility="visible" />
123137

124138
</LinearLayout>

0 commit comments

Comments
 (0)