Dinamik içeriği görüntüleyen bir RecyclerView var. Bu RecyclerView görünümünü diğer Görünümler arasında görüntüleyeceğim. Ben çalışıyor gibi görünmüyor denemek ve RecyclerView tüm yer kaplar gibi görünüyor olursa olsun, AncakYukarıdaki ve yukarıdaki görünümler RecyclerView
View
RecyclerView
View
: Örneğin, bir Görünüm ve üstünde RecyclerView altında görüntülenen bir Görünüm sergiledi. Sorunun, this custom LinearLayoutManager gibi bazı önerilen çözümleri denedim, ancak sorunumu gidermek için görünmüyor olsa da, sorunun wrap_content issue içinde bulunduğuna inanıyorum.
Denemesi:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- AppBar works fine; no issue here -->
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/app_bar_layout">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
app:layout_collapseMode="pin"/>
</android.support.design.widget.AppBarLayout>
<!-- Not displaying; Tried different views -->
<com.chrynan.taginput.view.TextInputWrapper
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edit_text_container">
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edit_text"/>
</com.chrynan.taginput.view.TextInputWrapper>
<!-- Takes up entire screen space -->
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/swipe_refresh">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler_view"/>
</android.support.v4.widget.SwipeRefreshLayout>
<!-- Not displaying -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/text_view"/>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
Soru: yukarıda Görünüm ve RecyclerView altında bir görünümü yerleştirmek ve görüntülemek için bir yolu var mı? Öyleyse nasıl? Yoksa bir ListView kullanmak daha mı iyi?
Düzenim, verdiğim örnekte olduğundan veya RecyclerView ile bilinen hatadan biraz daha karmaşık olduğundan, yalnızca bir layout_weight eklenmesi işe yaramadı. Ancak, bir RecyclerView yerine bir ListView kullanmaya karar verdim ve ListView'e layout_weight ekleyerek istediğim etkiyi verdim. – chRyNaN
Harika cevap. Bu benim için iyi çalıştı. – Mythul
Mükemmel Süper Harika ...... –