set Android ZoomButtonsController alignment?

喜欢而已 提交于 2019-11-29 17:37:39

ZoomButtonsController can be defined in XML files and can be positioned accordingly , for eg.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

<ZoomControls android:id="@+id/zoomControls1" 
          android:layout_height="wrap_content" 
          android:layout_width="wrap_content" 
          android:layout_alignParentTop="true"
          android:layout_alignParentRight="true">
</ZoomControls>

</RelativeLayout>

This layout will make your zoomcontrols in top-right of the screen as defined by the attributes ,

android:layout_alignParentTop="true"
android:layout_alignParentRight="true"

so basically you can align your views by nesting them in a Layout (like RelativeLayout , LinearLayout etc.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!