我有一个Viewgroup作为包含背景图像的相关布局的父级布局。我将动态添加到relativelayout并可以缩放和滚动它。当我改变方向时,背景图像缩小以适应风景。我想按照背景图像的比例更改相关布局控件。 Iam新手到Android,所以不清楚从哪里开始?android-根据背景图像按比例改变布局
布局
<com.example.pdoc.zoomablepdf.ZoomableViewGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foregroundGravity="center"
android:id="@+id/zoomLayout"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="@drawable/sample1pdf"
android:id="@+id/RelLayout">
</RelativeLayout>
</com.example.pdoc.zoomablepdf.ZoomableViewGroup>
其实我只是想相称的控制WRT背景图片,所以我不能为创造一个不同的布局......怎么把背景图像也会动态变化,控件动态添加 –