質問

してい RelativeLayout, このレイアウトの二つの領は、 MapView その他、 RelativeLayout を含むボタンを押します。

欲しいということ

私の透明ボックス( RelativeLayout 常に一番上に表示されているのをまとめたものです。

<RelativeLayout 
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">

  <com.google.android.maps.MapView
    android:id="@+id/mapView"/>

    <test.project.TransparentPanel 
      android:layout_width="fill_parent"
      android:layout_width="fill_parent">   

        <Button 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Click Me!"/>   

    </test.project.TransparentPanel>

</RelativeLayout>   

(私はあいのコード)

役に立ちましたか?

解決

加えてみるalignParentBottomオプションの透明パネルです。

<RelativeLayout 
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">

  <com.google.android.maps.MapView 
    android:id="@+id/mapView"/>

  <test.project.TransparentPanel
    android:layout_width="fill_parent"
    android:layout_width="fill_parent"
    android:layout_alignParentBottom="true">

      <Button 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Click Me!"/>         

  </test.project.TransparentPanel>

</RelativeLayout> 

他のヒント

としてコンスタン指摘の利用 layout_alignParentBottom 位置のボタンの下段に入れます。この問題について現在のmapviewも伸ばしていたのでしょうかを会はなかったようである。そのためのmapview成長下のボタンで、親ちろん中身は詰まっています。

以下をお試しください。最初の位置のボタンを親会社のビューを揃え、上記のボタンを押します。

<RelativeLayout 
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">

  <test.project.TransparentPanel
    android:id="@+id/button_area"
    android:layout_width="fill_parent"
    android:layout_width="fill_parent"
    android:layout_alignParentBottom="true">

      <Button 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Click Me!"/>         

  </test.project.TransparentPanel>

  <com.google.android.maps.MapView 
    android:id="@+id/mapView"
    layout_above="@id/button_area"/>

</RelativeLayout> 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top