侧边栏壁纸
博主头像
996worker

祇園精舎の鐘の聲, 諸行無常の響き有り。

  • 累计撰写 201 篇文章
  • 累计创建 48 个标签
  • 累计收到 8 条评论

目 录CONTENT

文章目录

Some tips when I develop layout.

996worker
2021-07-04 / 0 评论 / 0 点赞 / 251 阅读 / 1,085 字
温馨提示:
本文最后更新于 2021-07-24,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
  • 想要悬浮的东西,可以用FrameLayout,越后出现的越靠前,用gravity控制位置之类的。
  • Divider:
      <View
          android:layout_width="match_parent"
          android:layout_height="1dp"
          android:background="#eeee"/>
    
  • If I want some different colors in a single line of words:
      <LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="wrap_content"
                              android:orientation="horizontal"
                              android:padding="10dp">
    
                              <TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="由"
                                  android:textColor="#3c3d40" />
    
                              <TextView
                                  android:id="@+id/tv_good_info_store"
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="红色店铺名"
                                  android:textColor="#ff4040" />
    
                              <TextView
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:text="发货"
                                  android:textColor="#3c3d40" />
                          </LinearLayout>
    
  • If I want to import other layout:
      <include layout="@layout/more_layout" />
    
0

评论区