Fix redbox style

Differential Revision: D6689447

fbshipit-source-id: de6b1295e53c46bdf99f0f4a26130f516763ee66
This commit is contained in:
Andrew Chen (Eng) 2018-01-11 15:20:18 -08:00 committed by Facebook Github Bot
parent e3c27f585a
commit f363dfe766
2 changed files with 85 additions and 105 deletions

View File

@ -1,109 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#E80000"
>
<ListView
android:id="@+id/rn_redbox_stack"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
<View
android:id="@+id/rn_redbox_line_separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray"
android:visibility="gone"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#E80000"
>
<ProgressBar
android:id="@+id/rn_redbox_loading_indicator"
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="@android:style/Widget.ProgressBar.Small"
android:indeterminateOnly="true"
android:visibility="gone"
android:paddingLeft="16dp"
/>
<TextView
android:id="@+id/rn_redbox_report_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="14sp"
android:fontFamily="monospace"
android:visibility="gone"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:lineSpacingExtra="4dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/rn_redbox_dismiss_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:text="@string/catalyst_dismiss_button"
android:textColor="@android:color/white"
android:textSize="14sp"
android:alpha="0.5"
style="?android:attr/borderlessButtonStyle"
android:gravity="center_horizontal|top"
/>
<Button
android:id="@+id/rn_redbox_reload_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:text="@string/catalyst_reload_button"
android:textColor="@android:color/white"
android:textSize="14sp"
android:alpha="0.5"
style="?android:attr/borderlessButtonStyle"
android:gravity="center_horizontal|top"
/>
<Button
android:id="@+id/rn_redbox_copy_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:text="@string/catalyst_copy_button"
android:textColor="@android:color/white"
android:textSize="14sp"
android:alpha="0.5"
style="?android:attr/borderlessButtonStyle"
android:gravity="center_horizontal|top"
/>
<Button
android:id="@+id/rn_redbox_report_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:text="@string/catalyst_report_button"
android:textColor="@android:color/white"
android:textSize="14sp"
android:alpha="0.5"
style="?android:attr/borderlessButtonStyle"
android:visibility="gone"
android:gravity="center_horizontal|top"
/>
</LinearLayout>
<ListView
android:id="@+id/rn_redbox_stack"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:divider="@null"
android:dividerHeight="0dp"
/>
<View
android:id="@+id/rn_redbox_line_separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray"
android:visibility="gone"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<ProgressBar
android:id="@+id/rn_redbox_loading_indicator"
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="@android:style/Widget.ProgressBar.Small"
android:indeterminateOnly="true"
android:visibility="gone"
android:paddingLeft="16dp"
/>
<TextView
android:id="@+id/rn_redbox_report_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="14sp"
android:fontFamily="monospace"
android:visibility="gone"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:lineSpacingExtra="4dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/rn_redbox_dismiss_button"
android:text="@string/catalyst_dismiss_button"
style="@style/redboxButton"
/>
<Button
android:id="@+id/rn_redbox_reload_button"
android:text="@string/catalyst_reload_button"
style="@style/redboxButton"
/>
<Button
android:id="@+id/rn_redbox_copy_button"
android:text="@string/catalyst_copy_button"
style="@style/redboxButton"
/>
<Button
android:id="@+id/rn_redbox_report_button"
android:text="@string/catalyst_report_button"
android:visibility="gone"
style="@style/redboxButton"
/>
</LinearLayout>
</LinearLayout>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme"/>
<style name="Theme" />
<style name="Theme.Catalyst"/>
<style name="Theme.Catalyst.RedBox">
<item name="android:windowBackground">@color/catalyst_redbox_background</item>
@ -13,4 +13,14 @@
<item name="android:windowEnterAnimation">@anim/catalyst_push_up_in</item>
<item name="android:windowExitAnimation">@anim/catalyst_push_up_out</item>
</style>
<style name="redboxButton">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_margin">4dp</item>
<item name="android:background">@null</item>
<item name="android:gravity">center</item>
<item name="android:textColor">#dddddd</item>
<item name="android:textSize">14sp</item>
</style>
</resources>