我正在设计一个包含多个页面的视图.我希望上一页和下一页的边缘显示如下,并实现双指滑动以在页面之间切换.

我尝试使用这里ViewPager建议的负页边距,但只显示屏幕上的一个边,而不是同时显示.
或者,有什么方法可以将我的视图的一部分放在屏幕外,然后设置它的动画,给它一个ViewPager类型效果.
我该怎么办呢?谢谢 !
<LinearLayout
android:orientation="vertical"
android:layout_width="300dp"
android:layout_height="50dp">
<ImageView android:layout_height="40dp" android:id="@+id/imageView1"
android:background="@drawable/nicetab"
android:layout_width="300dp" ></ImageView>
<TextView
style="@style/DialogText.Title"
android:id="@+id/title"
android:paddingBottom="10dip"
android:paddingLeft="45dip"
android:paddingTop="7dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/codeFont"
android:textSize="15dip"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我怎么能把TextView放在ImageView上.在Android中有没有办法做到这一点,在HTML中我们很容易使用z-index,但在这里 - 不知道
过去几个月我一直在使用android.对我来说,问题现在与Z指数值有关.我正在使用textview,edittext和imageview进行布局.假设我有一个像这样的xml文件..
<Layout1>
<edittext><zindex>3</zindex></edittext>
<textview><zindex>2</zindex></textview>
<imageview><zindex>1</zindex></imageview>
</Layout1>
Run Code Online (Sandbox Code Playgroud)
所以我的问题是我正在通过DOM解析器读取这个xml文件,我想通过xml中定义的值为所有这些设置z索引值.现在我可以使用任何功能或属性来执行此操作.我已经学会了用xml编写它,但这会使它硬编码.我想要一个动态显示,所以如何使用zindex值调整布局.... HELP PLZ
我正在尝试创建一个布局,其中有背景中的图像和另一个图像放在背景图像的上方,但问题是我想在第一个上面放置第二个图像而不会丢失第二个图像的质量.现在它在第3张图片中有点模糊如下:
这是我的2张图片:
图1:

图2:

它看起来像这样:

第三个图像变得有点模糊..有可能使结果更清晰.
我的布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/image1"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >
<Button
android:id="@+id/intentskip"
android:layout_width="500dp"
android:layout_height="200dp"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/imageView1"
android:background="@drawable/blank"
android:visibility="visible" />
<ImageView
android:id="@+id/image2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:src="@drawable/frames_01521" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 我有一个FrameLayout,它将包含一组ImageViews.我正在使用FrameLayout,因为我实际上希望它们重叠.但是,当我向Layout添加项目时,我不希望它们只是堆叠.我实际上需要订购它们.
图像从存储中提取,我将其正确的顺序存储在我的数据库中,因此:
Image1 - layerNumber: 3
Image2 - layerNumber: 12
Image3 - layerNumber: 1
Image4 - layerNumber: 34
Image5 - layerNumber: 6
Image6 - layerNumber: 30
Run Code Online (Sandbox Code Playgroud)
当我将它们放在FrameLayout中时,我需要将它们放在layerNumber顺序的Layout中.此外,我将在使用该应用时一次添加一个或多个.我可以选择添加"Image50 - layerNumber:10"的内容.
我希望做的是使用像ImageView.setChildOrder(x)之类的东西.有没有办法做到这一点?
-----编辑-----每@fifarunnerr我做了这样的事情:
productLayers.addView(productIV, Integer.parseInt(productItem.get(1)));
Run Code Online (Sandbox Code Playgroud)
productItem.get(1)只是layerNumber.对于这个例子,它位于第23层.
我收到错误: java.lang.IndexOutOfBoundsException: index=23 count=3
我理解错误:我正在尝试将视图放置在第23个点有3个"点"的布局中.正如您在前面的数字中所看到的,layerNumber并不总是处于1..2..3..4 ...模式中.

您好,要获得像上图这样带有附加 reomve 按钮的视图,我尝试了以下 xml Linearlayout 并将其背景设置为圆形图像,但要获得成比例的图片使用 ImageView 会更好,
抱歉,我的英语不太好,但我只是想问我如何通过使用 ImageView 代替 LayoutBackground 来实现这一点...
<LinearLayout
android:id="@+id/imagePreview"
android:layout_width="140dp"
android:layout_height="140dp"
android:background="@drawable/profile_image_holder"
android:orientation="vertical"
android:padding="0dp" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/searchGroupButton"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginLeft="94dp"
android:layout_marginTop="5dp"
android:background="@drawable/icn_delete"
android:onClick="removeImage"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:paddingBottom="0dp"
android:textColor="#fff" />
</LinearLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) 我想用图像视图和相对布局来实现我的布局,如图所示.
我尝试使用此代码但不起作用.
<RelativeLayout
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textview_ratting"
android:layout_margin="5dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imageView"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_centerHorizontal="true"
android:src="@drawable/icon"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)