recyclerView 내부의 레이아웃 비율을 알 수있는 방법이 있습니까? RecyclerView 내부 팽창화면에 표시되는 RecyclerView 내부 레이아웃의 백분율
레이아웃의 PARAMS있다
android:layout_width="match_parent" android:layout_height="match_parent"
편집 레이아웃 파일을
레이아웃 파일 추가 -
활동 레이아웃 파일 custom_card.xml
<?xml version="1.0" encoding="utf-8"?
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@id/imageView"
android:layout_alignTop="@id/imageView"
android:scaleType="fitCenter"
android:src="@drawable/image_view_screen" />
</RelativeLayout>
합니다.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ProgressBar
android:visibility="gone"
android:layout_width="56dp"
android:layout_height="56dp"
android:id="@+id/progress_bar"
android:layout_centerInParent="true"/>
</RelativeLayout>
나는 내가 그것을 알아 냈 수직 형 LinearLayoutManager
당신이 당신의 레이아웃의 폭을 얻고, 여기에 높이를 사용하여 예를 –
에 대한 recyclerView의 폭을 비교할 수 있습니다. 레이아웃 높이는 화면에서 볼 수있는 부분이 아니라 원래 크기를 제공합니다. – Harshit
다음은 우리에게 뭔가를 보여줍니다. 스크린 샷? 레이아웃 파일? –