거의 모든 화면을 차지하도록 Google지도를 얻으려고하고 있지만 화면 하단에 내 전체 너비 표시 줄이 필요합니다. 지도. 이렇게하려면 상태 표시 줄에 TextView를 사용하여 LinearLayout을 사용하려고합니다. 그러나 상태 표시 줄은 나타나지 않습니다. 내 XML은안드로이드에서지도 조각 아래에 내 상태 표시 줄을 표시하려면 어떻게해야합니까?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
class="com.google.android.gms.maps.MapFragment" />
<TextView
android:id="@+id/main_status_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:padding = "4sp"
android:gravity="left|center_vertical"
android:text="Statusbar"
/>
</LinearLayout>
무엇이 잘못 되었나요?
추신 : android:layout_height
에 대해 두 가지 선택 사항, 즉 "wrap_content"
과 "match_parent"
만 있다는 점이 다소 우려됩니다. 상태 표시 줄의 사양이 필요한 크기 (예 : android:layout_height="wrap_content"
)가 아니며지도가 나머지 부분을 차지하는 것처럼 보이지 않습니다. 왜냐하면 android:layout_height="match_parent"
을 사용하는 것은 논리적으로 다른 것을위한 공간이 없기 때문입니다. 그러나, 작동하지 않는 것 모두
android:layout_height="wrap_content"
를 사용하여.
상태 표시 줄로 무엇을하고 싶은지 모르겠지만 'uiOptions = "splitActionBarWhenNarrow"(Manifest에서)가 도움이 될 수 있습니까? 만약 네가 네비게이션 등을 할 수 없다면 이걸 할 수있다. :) –
제안에 감사드립니다. @tenhouse 그러나 대답은 내가 틀린 XML을 가지고 있다는 것을 보여줍니다. – Stochastically