這篇文章將為大家詳細(xì)講解有關(guān)android中怎么實(shí)現(xiàn)一個(gè)商品詳情頁(yè)面,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個(gè)參考,希望大家閱讀完這篇文章后對(duì)相關(guān)知識(shí)有一定的了解。
布局文件骨架:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <!--因?yàn)橐谡w布局右下角放一個(gè)置頂圖標(biāo),所以用frameLayout包裹一下--> <FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"> <!--自定義的相對(duì)布局--> <www.gd.com.goodsdetails.view.ScrollViewContainer android:layout_width="match_parent" android:layout_height="match_parent"> <!--上半?yún)^(qū)域的scrollview,因?yàn)樯习雲(yún)^(qū)域也要滑動(dòng)--> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="240dp"> <!--這塊區(qū)域放輪播圖--> </FrameLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="500dp"> <!--這塊區(qū)域放商品詳情信息--> </FrameLayout> <!-- 中間繼續(xù)拖動(dòng)條目(繼續(xù)拖動(dòng),查看圖文詳情) 可以根據(jù)產(chǎn)品需求更改自己想要的樣式(一般這里都是一些簡(jiǎn)單的文字) --> <RelativeLayout android:layout_width="match_parent" android:layout_height="40dp"> ...... </RelativeLayout> </LinearLayout> </ScrollView><!--結(jié)束:上半?yún)^(qū)域的scrollview--> <!--下面需要顯示的webview了--> <WebView android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" /> </www.gd.com.goodsdetails.view.ScrollViewContainer> <!--一鍵滑到頂部的圖片--> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|right" android:layout_margin="15dp" /> </FrameLayout> <!--*******************************************************--> <!--這些無(wú)關(guān)緊要,“進(jìn)入店鋪”,“立即購(gòu)買”--> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <span > </span>...... </LinearLayout> </LinearLayout>
關(guān)于android中怎么實(shí)現(xiàn)一個(gè)商品詳情頁(yè)面就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。
新聞標(biāo)題:android中怎么實(shí)現(xiàn)一個(gè)商品詳情頁(yè)面-創(chuàng)新互聯(lián)
標(biāo)題來(lái)源:http://chinadenli.net/article10/ioido.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、企業(yè)建站、網(wǎng)站改版、網(wǎng)站制作、域名注冊(cè)、網(wǎng)站排名
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容