Skip to content

Commit

Permalink
Hardcoded all dimen to dimen.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
jainkuniya committed Dec 13, 2016
1 parent 0e252f6 commit c973739
Show file tree
Hide file tree
Showing 51 changed files with 267 additions and 211 deletions.
24 changes: 12 additions & 12 deletions source-code/app/src/main/res/layout/activity_about_buildm_learn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_margin="@dimen/margin_small"
android:gravity="center"
android:orientation="vertical">

Expand All @@ -30,15 +30,15 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/buildmlearn_logo"
android:padding="5dp"
android:padding="@dimen/simulator_very_small_padding"
android:src="@drawable/logo_bg_dark" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:padding="5dp">
android:padding="@dimen/simulator_very_small_padding">

<TextView
android:layout_width="match_parent"
Expand Down Expand Up @@ -66,25 +66,25 @@

<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_height="@dimen/height_divider_view"
android:layout_marginBottom="@dimen/margin_very_small"
android:layout_marginTop="@dimen/margin_very_small"
android:background="@color/black_hint_text_disabled" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="@dimen/margin_very_small"
android:layout_marginTop="@dimen/margin_very_small"
android:text="@string/about_para_1"
android:textColor="@color/black_secondary_text"
android:textSize="@dimen/body" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="@dimen/margin_very_small"
android:layout_marginTop="@dimen/margin_very_small"
android:autoLink="web"
android:text="@string/about_para_2"
android:textColor="@color/black_secondary_text"
Expand All @@ -93,8 +93,8 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="@dimen/margin_very_small"
android:layout_marginTop="@dimen/margin_very_small"
android:autoLink="email"
android:text="@string/about_para_3"
android:textColor="@color/black_secondary_text"
Expand Down
10 changes: 5 additions & 5 deletions source-code/app/src/main/res/layout/activity_first_run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@

<View
android:id="@+id/focus_thief"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_width="@dimen/height_divider_view"
android:layout_height="@dimen/height_divider_view"
android:focusable="true"
android:focusableInTouchMode="true" />

<EditText
android:id="@+id/first_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginTop="@dimen/margin_large"
android:ems="10"

android:hint="@string/main_name_hint"
android:inputType="textPersonName"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingLeft="@dimen/simulator_padding"
android:paddingRight="@dimen/simulator_padding"
android:textColorHint="@color/white_hint_text_disabled" />


Expand Down
8 changes: 4 additions & 4 deletions source-code/app/src/main/res/layout/activity_simulator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="5dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="10dp">
android:paddingBottom="@dimen/simulator_very_small_padding"
android:paddingLeft="@dimen/simulator_padding"
android:paddingRight="@dimen/simulator_padding"
android:paddingTop="@dimen/simulator_small_padding">
<!-- Main content view -->
<FrameLayout
android:id="@+id/container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:layout_gravity="center_vertical"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:dividerHeight="@dimen/listview_divider_height"
android:paddingBottom="@dimen/cardview_padding_last_bottom" />

<LinearLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_height="match_parent"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:dividerHeight="@dimen/listview_divider_height"
android:padding="@dimen/layout_margin" />


Expand Down
2 changes: 1 addition & 1 deletion source-code/app/src/main/res/layout/activity_tutorial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="10dip" />
android:padding="@dimen/height_pager_indicator" />
</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<View
android:layout_width="match_parent"
android:layout_height="0.86dp"
android:layout_height="@dimen/height_simulation_divider_view"
android:layout_marginLeft="@dimen/margin_mini_flash"
android:layout_marginRight="@dimen/margin_mini_flash"
android:background="@color/grey_shade_4_flash" />
Expand All @@ -57,7 +57,7 @@

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_height="@dimen/height_divider_view"
android:layout_marginLeft="@dimen/margin_mini_flash"
android:layout_marginRight="@dimen/margin_mini_flash"
android:background="@color/grey_shade_4_flash" />
Expand Down
2 changes: 1 addition & 1 deletion source-code/app/src/main/res/layout/app_bar_main_flash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="@dimen/large_height_2"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
Expand Down
2 changes: 1 addition & 1 deletion source-code/app/src/main/res/layout/app_bar_main_spell.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="@dimen/large_height_2"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="@dimen/large_height_2"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="@dimen/large_height_2"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="@dimen/large_height_2"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_simulator"
android:layout_marginTop="49dp"
android:layout_marginTop="@dimen/margin_large"
tools:context=".comprehensiontemplate.fragment.MainFragment"
tools:showIn="@layout/comprehension_app_bar_main">

<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardBackgroundColor="#FFFFFF"
card_view:cardCornerRadius="3.2dp"
card_view:cardElevation="3.2dp"
card_view:cardCornerRadius="@dimen/simulator_cardview_corner_radius"
card_view:cardElevation="@dimen/simulator_cardview_elevation"
card_view:cardUseCompatPadding="true">

<RelativeLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardBackgroundColor="#FFFFFF"
card_view:cardCornerRadius="3.27dp"
card_view:cardElevation="3.27dp"
card_view:cardCornerRadius="@dimen/simulator_cardview_corner_radius"
card_view:cardElevation="@dimen/simulator_cardview_elevation"
card_view:cardUseCompatPadding="true">

<RelativeLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_height="@dimen/height_divider_view"
android:background="@drawable/shadow_toolbar"
android:backgroundTint="@color/color_divider"
android:visibility="gone" />
Expand All @@ -27,8 +27,8 @@
android:layout_width="match_parent"
android:layout_height="@dimen/comprehension_cardHeightLastActivity"
card_view:cardBackgroundColor="#FFFFFF"
card_view:cardCornerRadius="3.27dp"
card_view:cardElevation="3.27dp"
card_view:cardCornerRadius="@dimen/simulator_cardview_corner_radius"
card_view:cardElevation="@dimen/simulator_cardview_elevation"
card_view:cardUseCompatPadding="true">

<RelativeLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5sp"
android:layout_marginBottom="@dimen/margin_very_very_small"
android:orientation="horizontal">

<Button
android:id="@+id/upload"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="30sp"
android:layout_margin="5sp"
android:layout_height="@dimen/large_height"
android:layout_margin="@dimen/margin_very_very_small"
android:background="#cfd8dc"
android:padding="5sp"
android:padding="@dimen/padding_very_very_small"
android:text="@string/upload" />

<TextView
Expand Down
22 changes: 11 additions & 11 deletions source-code/app/src/main/res/layout/comprehension_meta_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
android:id="@+id/title"
style="@style/TextView.Title.Bold"
class="org.buildmlearn.toolkit.views.TextViewPlus"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="@dimen/margin_small"
android:layout_marginStart="@dimen/margin_small"
android:layout_weight="1"
android:lineSpacingMultiplier="1.2"
android:paddingBottom="8dp"
android:paddingTop="16dp" />
android:paddingBottom="@dimen/padding_very_small"
android:paddingTop="@dimen/padding_small" />

<view
android:id="@+id/timer"
Expand All @@ -30,20 +30,20 @@
android:layout_marginRight="16dp"
android:layout_weight="1"
android:gravity="end"
android:paddingBottom="8dp"
android:paddingTop="16dp" />
android:paddingBottom="@dimen/padding_very_small"
android:paddingTop="@dimen/padding_small" />

</LinearLayout>

<view
android:id="@+id/passage"
style="@style/TextView.Body1"
class="org.buildmlearn.toolkit.views.TextViewPlus"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="@dimen/margin_small"
android:layout_marginStart="@dimen/margin_small"
android:lineSpacingMultiplier="1.2"
android:paddingBottom="16dp"
android:paddingEnd="16dp"
android:paddingRight="16dp" />
android:paddingBottom="@dimen/padding_small"
android:paddingEnd="@dimen/padding_small"
android:paddingRight="@dimen/padding_small" />

</LinearLayout>
8 changes: 4 additions & 4 deletions source-code/app/src/main/res/layout/content_main_flash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="52.12dp"
android:layout_marginTop="@dimen/match_template_footer_a_height"
tools:context=".flashcardtemplate.fragment.MainFragment"
tools:showIn="@layout/app_bar_main_flash">

<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardBackgroundColor="#FFFFFF"
card_view:cardCornerRadius="3.47dp"
card_view:cardElevation="3.47dp"
card_view:cardCornerRadius="@dimen/cardview_corner_radius"
card_view:cardElevation="@dimen/cardview_elevation"
card_view:cardUseCompatPadding="true">

<RelativeLayout
Expand Down Expand Up @@ -45,7 +45,7 @@
<LinearLayout
android:id="@+id/flashcardfragmentcontainer"
android:layout_width="match_parent"
android:layout_height="217.17dp"
android:layout_height="@dimen/view_pager_layout_height"
android:layout_below="@id/question"
android:gravity="center">

Expand Down
Loading

0 comments on commit c973739

Please sign in to comment.