Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjoongcho committed Mar 27, 2018
1 parent 2c3dd41 commit 3e71d2a
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 113 deletions.
59 changes: 29 additions & 30 deletions app/src/main/res/layout/activity_security_add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<FrameLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>

<FrameLayout
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
Expand Down Expand Up @@ -144,19 +143,19 @@
</ScrollView>
</android.support.v7.widget.CardView>
</RelativeLayout>
</LinearLayout>

<com.simplemobiletools.commons.views.MyFloatingActionButton
android:id="@+id/save"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/spacing_double"
android:layout_marginEnd="@dimen/spacing_double"
android:layout_marginRight="@dimen/spacing_double"
android:src="@drawable/save"
app:backgroundTint="@color/colorPrimary" />
</FrameLayout>
<com.simplemobiletools.commons.views.MyFloatingActionButton
android:id="@+id/save"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/spacing_double"
android:layout_marginEnd="@dimen/spacing_double"
android:layout_marginRight="@dimen/spacing_double"
android:src="@drawable/save"
app:backgroundTint="@color/colorPrimary" />
</FrameLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
</layout>
77 changes: 38 additions & 39 deletions app/src/main/res/layout/activity_security_detail.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
<layout>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<FrameLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:id="@+id/fragment_sign_in_content"
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>

<FrameLayout
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
Expand Down Expand Up @@ -140,27 +139,27 @@
</ScrollView>
</android.support.v7.widget.CardView>
</RelativeLayout>
</LinearLayout>

<com.simplemobiletools.commons.views.MyFloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/update"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/spacing_double"
android:layout_marginEnd="@dimen/spacing_double"
android:layout_marginRight="@dimen/spacing_double"
android:src="@drawable/edit_property"
app:backgroundTint="@color/colorPrimary" />
<ProgressBar
android:id="@+id/loading_progress"
android:visibility="invisible"
android:layout_gravity="center"
android:layout_width="20dp"
android:layout_height="20dp" />
</FrameLayout>
<com.simplemobiletools.commons.views.MyFloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/update"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/spacing_double"
android:layout_marginEnd="@dimen/spacing_double"
android:layout_marginRight="@dimen/spacing_double"
android:src="@drawable/edit_property"
app:backgroundTint="@color/colorPrimary" />
<ProgressBar
android:id="@+id/loading_progress"
android:visibility="invisible"
android:layout_gravity="center"
android:layout_width="20dp"
android:layout_height="20dp" />
</FrameLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
</layout>
75 changes: 37 additions & 38 deletions app/src/main/res/layout/activity_security_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<FrameLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>

android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>

<FrameLayout
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
Expand Down Expand Up @@ -144,26 +143,26 @@
</ScrollView>
</android.support.v7.widget.CardView>
</RelativeLayout>
</LinearLayout>

<com.simplemobiletools.commons.views.MyFloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/save"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/spacing_double"
android:layout_marginEnd="@dimen/spacing_double"
android:layout_marginRight="@dimen/spacing_double"
android:src="@drawable/save"
app:backgroundTint="@color/colorPrimary" />
<ProgressBar
android:id="@+id/loading_progress"
android:layout_gravity="center"
android:layout_width="20dp"
android:layout_height="20dp" />
</FrameLayout>
<com.simplemobiletools.commons.views.MyFloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/save"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/spacing_double"
android:layout_marginEnd="@dimen/spacing_double"
android:layout_marginRight="@dimen/spacing_double"
android:src="@drawable/save"
app:backgroundTint="@color/colorPrimary" />
<ProgressBar
android:id="@+id/loading_progress"
android:layout_gravity="center"
android:layout_width="20dp"
android:layout_height="20dp" />
</FrameLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
</layout>
7 changes: 3 additions & 4 deletions app/src/main/res/layout/activity_security_selection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
android:transitionGroup="false"
android:orientation="vertical"
tools:ignore="Overdraw,UnusedAttribute">

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -28,6 +27,7 @@
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

<LinearLayout
android:paddingTop="5dp"
android:paddingBottom="5dp"
Expand All @@ -45,17 +45,16 @@
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content" />

<ImageView
android:id="@+id/toggleToolBar"
android:src="@drawable/ic_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>

</android.support.design.widget.AppBarLayout>

<FrameLayout
android:id="@+id/main_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
Expand All @@ -66,6 +65,7 @@
tools:context="activity.QuizSelectionActivity"
tools:ignore="MergeRootFrame">
</LinearLayout>

<io.github.hanjoongcho.commons.views.ModalView
android:id="@+id/modal_holder"
android:visibility="gone"
Expand All @@ -76,5 +76,4 @@
</FrameLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>

</layout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_securities.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_sign_in_content"
android:id="@+id/main_holder"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/items_wrapper"
android:padding="@dimen/card_layout_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.simplemobiletools.commons.views.MyRecyclerView
Expand Down

0 comments on commit 3e71d2a

Please sign in to comment.