나는 누구의 레이아웃 ListActivity
여기에 관련빈 ListView에 대해 ViewGroup을 사용할 수 있습니까?
<?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">
<ListView android:id="@android:id/list" android:cacheColorHint="@color/transparent" style="@style/FullWidth.NoteList" />
<LinearLayout android:id="@android:id/empty" style="@style/FillParent">
<ImageView style="@style/NoNotesImage" />
<TextView android:text="@string/no_notes" style="@style/Shadowed.NoNotesText" />
<Button android:id="@+id/note_add" android:text="@string/note_add" style="@style/Shadowed.Button.Blue"/>
</LinearLayout>
</LinearLayout>
처럼 스타일을 보이는 있습니다.
<?xml version="1.0" encoding="utf-8"?>
<style name="Shadowed">
<item name="android:shadowDx">1.1</item>
<item name="android:shadowDy">1.1</item>
<item name="android:shadowRadius">1.1</item>
</style>
<style name="NoNotesImage">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:layout_marginTop">80.5dip</item>
<item name="android:layout_marginLeft">20dip</item>
<item name="android:src">@drawable/bg_no_notes</item>
</style>
<style name="Shadowed.NoNotesText">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:textSize">10sp</item>
<item name="android:textColor">@color/no_notes_text</item>
<item name="android:shadowColor">@color/no_notes_shadow</item>
</style>
<style name="FillParent">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
</style>
는하지만, 내 비어있는 목록보기에만 중첩 된 LinearLayout
내부 첫째 나열된 ImageView
로 구성되어 있습니다.
이것은 합리적인 것처럼 보이지만 Android의 레이아웃 규칙을 완전히 이해하지 못했습니다.
비어있는 ViewGroup을 빈 View로 사용할 수 있습니다. 스타일을 많이 사용하기 때문에 잘못된 정보가 무엇인지 알기가 어렵습니다. 따라서 XML이 실제로 어떻게 배치되었는지 알 수 없습니다. 어쩌면 당신이 사용하고있는 스타일을 보여줄 수 있습니까? 또한 스타일은 일반적으로 layout_width 및 layout_height와 같은 기본 속성에 사용되지 않습니다. –
죄송합니다. 사용하고있는 스타일을 추가했습니다. –