Skip to content

Commit

Permalink
1.布局格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
tiamosu committed Sep 26, 2019
1 parent 737aa05 commit a9c5c3a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 34 deletions.
5 changes: 2 additions & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout 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"
Expand All @@ -13,5 +12,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
5 changes: 2 additions & 3 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand All @@ -15,5 +14,5 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText"/>
tools:ignore="all" />
</androidx.constraintlayout.widget.ConstraintLayout>
17 changes: 8 additions & 9 deletions app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -16,39 +15,39 @@
android:id="@+id/main_user_id_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入账号"/>
android:hint="请输入账号" />

<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/main_user_psd_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入密码"/>
android:hint="请输入密码" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/main_login_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"/>
android:text="Hello World!" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/main_open_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"/>
android:text="Hello World!" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"/>
android:text="Hello World!" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"/>
android:text="Hello World!" />

<FrameLayout
android:id="@+id/main_fl"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content" />
</androidx.appcompat.widget.LinearLayoutCompat>
</ScrollView>
21 changes: 10 additions & 11 deletions module/module_a/src/main/res/layout/fragment_a.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -11,47 +10,47 @@
android:id="@+id/jump_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="进入第二页"/>
android:text="进入第二页" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/photo_iv"
android:layout_width="50dp"
android:layout_height="50dp"
tools:src="@mipmap/ic_launcher"/>
tools:src="@mipmap/ic_launcher" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/test_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="测试"/>
android:text="测试" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4"/>
android:text="4" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5"/>
android:text="5" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="6"/>
android:text="6" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="7"/>
android:text="7" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="8"/>
android:text="8" />

<androidx.appcompat.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="9"/>
android:text="9" />
</androidx.appcompat.widget.LinearLayoutCompat>
7 changes: 3 additions & 4 deletions module/module_b/src/main/res/layout/fragment_b.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand All @@ -13,7 +12,7 @@
android:text="下一页"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText"/>
tools:ignore="HardcodedText" />

<androidx.core.widget.NestedScrollView
android:layout_width="0dp"
Expand All @@ -31,6 +30,6 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
8 changes: 4 additions & 4 deletions module/module_common/src/main/res/layout/fragment_empty.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="It is empty page!"
android:textSize="18sp"
tools:ignore="HardcodedText"/>
tools:ignore="all" />
</FrameLayout>

0 comments on commit a9c5c3a

Please sign in to comment.