0
내 활동에 대한 의견을 정리하는 데 어려움을 겪고 있습니다.
나는 간단한 효과에 도달 할 :/숨기기 작업을 보여줄 수있을 것입니다 일부 텍스트보기 및 라디오와스크롤 레이아웃과 필터 패널로보기 배치
- 필터 컨테이너를 아래
- : 사진의 큰 양 그리드보기
물론 사용자가 스크롤하여 모든 사진을 보여줄 수 있도록 내보기를 스크롤 가능하게 만들고 싶습니다.
게다가 필자는 필터의 위치를 고정시키고 싶습니다.
원하는 레이아웃입니다.
나는 다음과 같은 방법으로 일을하려고했다 :<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="..."
android:id="@+id/allViews">
<!-- panel with some filter controls -->
<LinearLayout
android:id="@+id/searchOpts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/search_opts_margin"
android:visibility="gone"
android:orientation="vertical">
<RadioGroup
android:id="@+id/sortOrder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:orientation="horizontal">
<RadioButton
android:id="@+id/orderByTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/orderByRating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RadioGroup>
<MultiAutoCompleteTextView
android:id="@+id/tags"
android:hint="@string/tags_label"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:inputType="textNoSuggestions|textCapSentences|textMultiLine"
android:textSize="16sp"
android:textColor="#555"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sortOrder" />
</LinearLayout>
<!-- panel with grid of big amount of images -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_marginBottom="5dp"
android:id="@+id/sv"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/items_grid_margin_under_search_opts"
app:layout_constraintTop_toBottomOf="@+id/searchOpts"
android:layout_height="match_parent" >
<GridView
android:id="@+id/PhotosGrid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:columnWidth="100dp"
android:drawSelectorOnTop="true"
android:gravity="center"
android:numColumns="auto_fit"
android:verticalSpacing="5dp"
android:horizontalSpacing="5dp"
android:focusable="true"
android:clickable="true"/>
</ScrollView>
</android.support.constraint.ConstraintLayout>
은 불행히도 실패와 약간의 도움이 필요합니다.
달성되었다 & 어떤 도움이 원하는 무엇? – Akhil
Grid에 ScrollView가 필요하지 않습니다. 이미 스크롤 할 수 있습니다. 스크롤 할 수있는 항목이 더 많은 경우 자동으로 스크롤됩니다. – elmorabea
먼저 스크롤 막대보기가 필터 패널과 겹칩니다. : app : layout_constraintTop_toBottomOf = "@ + id/searchOpts" – pumbosha