Adjust widget text gravity (#35430)
This commit is contained in:
@@ -38,8 +38,9 @@
|
||||
android:textStyle="bold"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:gravity="start"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:text="@string/try_brave_search_widget"
|
||||
android:textColor="@color/text_primary"/>
|
||||
|
||||
@@ -48,8 +49,9 @@
|
||||
style="@style/DefaultRegular"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:gravity="start"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:text="@string/try_brave_search_widget_description"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
@@ -66,17 +68,17 @@
|
||||
android:background="@drawable/button_transparent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/not_now"
|
||||
android:gravity="end"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:textColor="@color/schemes_on_surface_variant" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btAddWidget"
|
||||
style="@style/LargeFilledButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@string/add_widget" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -2704,7 +2704,10 @@ public abstract class BraveActivity extends ChromeActivity
|
||||
private void showWidgetPromoPanel() {
|
||||
if (mSearchWidgetPromoPanel != null) {
|
||||
final View rootView = requireViewById(android.R.id.content);
|
||||
mSearchWidgetPromoPanel.showIfNeeded(rootView, getBottomOffsetForWidgetPromo(), this);
|
||||
rootView.post(
|
||||
() ->
|
||||
mSearchWidgetPromoPanel.showIfNeeded(
|
||||
rootView, getBottomOffsetForWidgetPromo(), BraveActivity.this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user