Skip to content

Commit

Permalink
Fix redbox style
Browse files Browse the repository at this point in the history
Differential Revision: D6689447

fbshipit-source-id: de6b1295e53c46bdf99f0f4a26130f516763ee66
  • Loading branch information
ayc1 authored and facebook-github-bot committed Jan 11, 2018
1 parent e3c27f5 commit f363dfe
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 105 deletions.
178 changes: 74 additions & 104 deletions ReactAndroid/src/main/res/devsupport/layout/redbox_view.xml
Original file line number Diff line number Diff line change
@@ -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"
>
<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"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#E80000"
>
<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>
12 changes: 11 additions & 1 deletion ReactAndroid/src/main/res/devsupport/values/styles.xml
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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>

0 comments on commit f363dfe

Please sign in to comment.