我需要为orTextView
的每一行设置填充。我尝试使用and child ( ,...) 但没有任何结果。我能怎么做?谢谢ListView
ExpandableListView
android:padding
paddingLeft
编辑:
这是项目的代码ExpandableListView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dp" >
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:id="@+id/titleScheda"
android:text="TextView"
android:layout_width="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:padding="20dp" />
</LinearLayout>
TextView
即使仅在 2 个标签之一中设置了内边距,也无法在两种布局上设置内边距。
编辑 :
解决了。问题出在 Java 代码中,在SimpleExpandableListAdapter
声明中。使用标准布局是不可能自定义的,但是为可扩展内容使用自定义布局是允许我们自定义任何内容的解决方案。