android:layout_below="@id⼀rl_userinfo" android:layout_marginBottom="@dimen⼀margin_superlarge" 啥意思

2025-02-26 22:49:03
推荐回答(3个)
回答1:

android:layout_below是用来设置当前控件的位置在某个位置下面,android:layout_marginBottom是用来设置当前控件距离下面控件的间距。

  1. android:layout_below 在相对布局中,比较常用,用于指定当前的控件在某个控件的下面,例如android:layout_below="@id/rl_userinfo",表示在id为rl_userinfo的控件下面。

  2. android:layout_marginBottom是设置控件的外边距,设置当前控件距离下面控件的间距,例如android:layout_marginBottom="@dimen/margin_superlarge",表示引用了一个大小,为margin_superlarge的设置。

  3. @dimen 是用于定义控件尺寸的属性。例如:10dp

回答2:

android:layout_below="@id/rl_userinfo"是指位置在id为rl_userinfo控件的下方android:layout_marginBottom="@dimen/margin_superlarge"是定义外向向下的距离
android:ellipsize="end"指text显示效果当text超出控件长度时,后面的内容显示为省略号
android:singleLine="true"所有内容单行显示
android:layout_toLeftOf="@id/btn_change_user"是指位置在id为btn_change_user控件的左方方

回答3:

楼上正解