Commit f54efc6b by gao.chao

流式布局

parent d323f1ad
......@@ -17,6 +17,7 @@ import com.mayi.fastdevelop.view.wheel.ChangeTimeDialog;
/**
* 常用控件
* 用流式布局展示UI
*/
public class ViewActviity extends BaseActivity {
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
android:id="@+id/click"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="防止多次点击"/>
android:text="防止多次点击" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -12,14 +7,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="仿IOS 开关控件"
android:textColor="@color/color_666666" />
android:padding="@dimen/size_10"
android:textColor="@color/color_666666"
android:text="流式布局"/>
<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" />
<com.google.android.material.internal.FlowLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
......@@ -115,5 +110,19 @@
android:layout_height="wrap_content"
android:text="展示Loading" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
</com.google.android.material.internal.FlowLayout>
<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