【发布时间】:2015-07-29 10:49:57
【问题描述】:
我想创建背景图像大小大于屏幕的滚动视图,以执行“长滚动页面”应用程序。我正在使用以下 XML 进行布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:p1="http://schemas.android.com/apk/res/android"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/relativeLayout1">
<ScrollView
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="wrap_content"
p1:layout_height="wrap_content"
p1:id="@+id/scrollView1"
p1:background="@drawable/wallpaper"
/>
</RelativeLayout>
我的壁纸(背景图片尺寸为 1920x820。
问题: 如果我使用滚动视图标签,为什么我的运行应用程序的背景总是调整为屏幕大小?
我想要达到的目标: 和这里一样的效果: http://developer.xamarin.com/recipes/ios/content_controls/scroll_view/use_a_scrollview/
测试环境 Nexus 4 模拟器
【问题讨论】:
-
尝试在你的 scrollView 中添加一个 ImageView 并将该图像视图的图像源设置为你的背景图像
标签: android xamarin scrollview