Commit f54efc6b by gao.chao

流式布局

parent d323f1ad
...@@ -17,6 +17,7 @@ import com.mayi.fastdevelop.view.wheel.ChangeTimeDialog; ...@@ -17,6 +17,7 @@ import com.mayi.fastdevelop.view.wheel.ChangeTimeDialog;
/** /**
* 常用控件 * 常用控件
* 用流式布局展示UI
*/ */
public class ViewActviity extends BaseActivity { public class ViewActviity extends BaseActivity {
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="horizontal">
<Button <Button
android:id="@+id/click" android:id="@+id/click"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="防止多次点击"/> android:text="防止多次点击" />
</android.support.constraint.ConstraintLayout> </LinearLayout>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
...@@ -12,14 +7,14 @@ ...@@ -12,14 +7,14 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="仿IOS 开关控件" android:padding="@dimen/size_10"
android:textColor="@color/color_666666" /> android:textColor="@color/color_666666"
android:text="流式布局"/>
<com.mayi.fastdevelop.view.IOSSwitchView
android:id="@+id/s" <com.google.android.material.internal.FlowLayout
android:layout_width="@dimen/size_36" android:layout_width="match_parent"
android:layout_height="@dimen/size_18" android:layout_height="wrap_content">
android:layout_margin="@dimen/size_15" />
<Button <Button
...@@ -115,5 +110,19 @@ ...@@ -115,5 +110,19 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="展示Loading" /> android:text="展示Loading" />
</LinearLayout>
</ScrollView> </com.google.android.material.internal.FlowLayout>
\ No newline at end of file
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="仿IOS 开关控件"
android:textColor="@color/color_666666" />
<com.mayi.fastdevelop.view.IOSSwitchView
android:id="@+id/s"
android:layout_width="@dimen/size_36"
android:layout_height="@dimen/size_18"
android:layout_margin="@dimen/size_15" />
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment