0

我试图弄清楚如何在没有标签布局的情况下制作滑动视图。

在上图中, 1. 我想做一个可以左右导航页面的滑动视图。2.图标1是一个全局菜单,需要在滑动时一直存在。3. 图标 3 是底栏。我怎么能这样?

任何类型的建议和教程链接将不胜感激。提前致谢。

4

3 回答 3

3

我没有任何相同的链接,但我仍然会告诉你创建的非常简单的逻辑:

1.首先使用删除标题栏

 this.requestWindowFeature(Window.FEATURE_NO_TITLE);

2.使用以下结构

 <RelativeLayout> 
    <ViewPager android:layout_height="fill_parent"
                android:layout_width="fill_parent"> //full screen

        <RelativeLayout android:id="@+id/header"> -->for header
          android:layout_alignParentTop="true"
        </RelativeLayout> 

         <RelativeLayout> -->for inicators
          android:below="@+id/header"
        </RelativeLayout>

        <RelativeLayout> --> for footer
         android:layout_alignParentBottom="true"
        </RelativeLayout>

    </ViewPager>        
</RelativeLayout> 

3.现在制作页眉和页脚的图像并设置为背景。
4.for view pager indicator go through This Post .just 下载它并在你的 Eclipse 中导入并在你的项目中设置为一个 lib。如何使用圆形寻呼机指示器检查我的答案

你现在完成了!

于 2014-06-11T10:24:20.820 回答
1

您可以简单地使用例如官方文档中解释的 ViewPager,因为它不是强制性的。

http://developer.android.com/training/animation/screen-slide.html

该链接中有一个完整的示例。

如果您还需要为幻灯片显示点,您可以利用其他用户指出的这个库:http: //viewpagerindicator.com/

于 2014-06-11T09:14:13.653 回答
0

检查这个库我认为这是你需要的,你可以根据你的需要定制它

https://github.com/pakerfeldt/android-viewflow

于 2014-06-11T09:30:32.600 回答