안 드 로 이 드 상품 상세 페이지 디자인 상세 설명
먼저 효과 도(스타일,구 조 는 제품 의 요구 에 따라 바 꿀 수 있 습 니 다)를 보 세 요.
먼저 대체적으로 말 하면 전체적인 구 조 는 LinearLayout 를 사용 하여 이 루어 진 것 이다.상하 두 부분 으로 나 뉘 는데 위 는 우리 가 미 끄 러 질 수 있 는 사용자 정의 구조 이 고 아래 는'가게 에 들 어가','즉시 구 매'라 는 중요 하지 않 은 구조 이다.
다음은 제품 의 요구 에 따라 변 경 된 것 으로 앱 마다 거의 다 르 기 때문에 중요 하지 않다.
레이아웃 파일 골격:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- , frameLayout -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<!-- -->
<www.gd.com.goodsdetails.view.ScrollViewContainer
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- scrollview, -->
<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">
<!-- -->
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="500dp">
<!-- -->
</FrameLayout>
<!--
( , )
( )
-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp">
......
</RelativeLayout>
</LinearLayout>
</ScrollView><!-- : 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>
<!--*******************************************************-->
<!-- ,“ ”,“ ”-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<span style="white-space:pre"> </span>......
</LinearLayout>
</LinearLayout>
실제 페이지 의 가장 큰 난점 은 바로 이 사용자 정의 레이아웃 파일 입 니 다:ScrollView Container그러나 매우 시원 한 것 은 여러분 이 직접 쓰 지 않 고 데모 에서 ScrollView Container 를 자신의 프로젝트 에 복사 하면 사용 할 수 있 고 매우 편리 하 다 는 것 입 니 다.
효과 도 는 우리 프로젝트 에서 정말 사용 하 는 것 입 니 다.ScrollView Container 역시 상하 두 부분 으로 나 뉘 어'드래그 항목'에서 분 리 됩 니 다.
상반부 의 맨 위 에 보통 윤파 도 를 놓 은 다음 에 아래 에 상품 의 상세 한 정 보 를 놓 아 사람들 이 선택 하 는 속성 정 보 를 제공한다.
이것들 은 모두 수요 에 따라 스스로 추가 할 수 있다.
아 랫 부분 은 보통 웹 뷰 를 하나 넣 는데'경 동'은 세 개 넣 었 어 요.
우 리 는 아래 웹 뷰 를 ScrollView 로 바 꾸 고 그 안에 무엇 을 넣 고 싶 은 지 고민 할 필요 가 없습니다.
클릭 하여 링크 열기 무료원본 코드 다운로드
이상 이 바로 본 고의 모든 내용 입 니 다.여러분 의 학습 에 도움 이 되 고 저 희 를 많이 응원 해 주 셨 으 면 좋 겠 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Kotlin의 기초 - 2부지난 글에서는 Kotlin이 무엇인지, Kotlin의 특징, Kotlin에서 변수 및 데이터 유형을 선언하는 방법과 같은 Kotlin의 기본 개념에 대해 배웠습니다. 유형 변환은 데이터 변수의 한 유형을 다른 데이터...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.