【问题标题】:What view is this and how can I implement it?这是什么观点,我该如何实施?
【发布时间】:2015-05-28 17:57:08
【问题描述】:

这是什么视图,如何实现?

【问题讨论】:

    标签: android list android-listview android-view


    【解决方案1】:

    它看起来类似于带有自定义布局的 CardView (https://developer.android.com/training/material/lists-cards.html)。

    【讨论】:

      【解决方案2】:

      这是一个全息光框架布局,其中包含一些视图和 TextView。 您必须自己设置格式,但这是一个基本示例。

       <RelativeLayout
          android:id="@+id/exampleRL"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_margin="20dp"
          android:background="@android:drawable/dialog_holo_light_frame" >
      
          <TextView
              android:id="@+id/firstDescription"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:padding="10dp"
              android:textIsSelectable="true"
              android:text="Example text"
              android:textColor="#000000"
              android:textSize="12dp" />
      
          <View
              android:id="@+id/Bar"
              android:layout_width="match_parent"
              android:layout_height="1dp"
              android:layout_below="@+id/firstDescription"
              android:background="#DCDCDC" />
      
          <TextView
              android:id="@+id/secondDescription"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_below="@+id/Bar"
              android:padding="10dp"
              android:textIsSelectable="true"
              android:text="More text examples"
              android:textColor="#B0C4DE"
              android:textSize="12dp" />
      </RelativeLayout>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2011-11-26
        • 1970-01-01
        • 2020-10-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-12-31
        相关资源
        最近更新 更多