最近項目上需要實現這樣效果的一個頁面,本來想找個現成的兩下搞定,但是問了半天度娘也沒招,索性自己琢磨琢磨(這里邊也少不了同事的幫助),先把最終的效果圖貼上:
專業公司可以根據自己的需求進行定制,網站設計制作、成都網站設計構思過程中功能建設理應排到主要部位公司網站設計制作、成都網站設計的運用實際效果公司網站制作網站建立與制做的實際意義理論上講,其本質并不復雜,就是一個viewpager,但是第一次實現這樣的效果還是要花些時間的,具體的代碼如下:
主布局文件:activity_show_industry_list.xml,主要就是一個activity上放個viewpager,但是相對布局是關鍵
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:background="@color/colorGrayBg"> <huazheng.haiereng.views.TitleView android:layout_width="match_parent" android:layout_height="wrap_content" app:titleText="搜索框預留位置" app:showBackButton="true" android:id="@+id/titleView" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:layerType="software" android:id="@+id/awq_rl_vpc"> <android.support.v4.view.ViewPager android:id="@+id/vp_show_industry_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:clipChildren="false" android:layout_marginLeft="40dp" android:layout_marginRight="40dp" android:layout_marginBottom="90dp" /> </RelativeLayout> </LinearLayout>
網頁標題:Android實現橫向滑動卡片效果-創新互聯
本文來源:http://vcdvsql.cn/article44/ispee.html
成都網站建設公司_創新互聯,為您提供動態網站、網站設計、外貿建站、網站維護、小程序開發、用戶體驗
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯