原先用的是三方的流式布局,后来发现google自己也有,效果是一样的。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.internal.FlowLayout
android:id="@+id/llOrderTags"
app:lineSpacing="6dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
</com.google.android.material.internal.FlowLayout>
</LinearLayout>
private fun getTextView(rightMargin:Float = 10f):TextView{
var textView = Te