SurfaceView am Bottom verankern ?

  • Antworten:1
  • Bentwortet
Mac Systems
  • Forum-Beiträge: 1.727

13.01.2011, 13:50:07 via Website

Hallo,

hat das jemand mal geschafft ? Bei mir wird das SurfaceView im Center dargestellt.

Dabei geht das doch recht simpel mit einem ImageView:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="#269" android:gravity="center_horizontal"
>



<ImageView android:id="@+id/icon" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_gravity="center_vertical"
android:layout_alignParentBottom="true"
android:src="@drawable/icon" />




</RelativeLayout>

Wo ist mein Denkfehler ?

— geändert am 13.01.2011, 13:50:19

Windmate HD, See you @ IO 14 , Worked on Wundercar, Glass V3, LG G Watch, Moto 360, Android TV

Antworten
Mac Systems
  • Forum-Beiträge: 1.727

13.01.2011, 16:39:55 via Website

Fürs Logbuch:

Das Layouting des eines SurfaceViews erlaubt es in der View#onMeasure Methode entsprechend werte zu setzten. Mir was das nicht klar nun funktioniert das ganze wie gewollt.

- Mac

Windmate HD, See you @ IO 14 , Worked on Wundercar, Glass V3, LG G Watch, Moto 360, Android TV

Antworten