【发布时间】:2017-05-17 09:15:25
【问题描述】:
如果您可以设置自己的 Ring,我正在开发一个 Android 应用程序。
现在我想在用户选择多个环时为他们提供环的预览。
我的想法是这样设置的:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="5dp">
<ImageView
android:id="@+id/generator_ring_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#e7e7e7"/>
<FrameLayout
android:id="@+id/generator_ring_addon_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
</FrameLayout>
我将通过在代码中创建一个新的 ImageView 以编程方式添加插件环。
现在最困难的部分是将图像放在另一个环上,并在每个屏幕尺寸上都有相同的视图..
有没有人可以帮助我获得正确的代码,以便将图像放置在每个屏幕尺寸上的正确位置?
感谢阅读
编辑:
在我选择插件环的那一刻,基础环已经可见,所以我可以获得图像的高度
【问题讨论】:
标签: java android image android-layout android-xml