मैंने हाल ही में AppCompat 21 के नए घटकों और सामग्री डिज़ाइन को लागू करने के साथ गड़बड़ करना शुरू कर दिया है। वर्तमान में, मेरे पास टूलबार के साथ एक्शनबार एक्टिविटी है और मैं टेक्स्टव्यू आइटम्स के रीसाइक्लर व्यू (केवल रीसाइक्लर का परीक्षण करने के लिए) युक्त एक टुकड़ा होस्ट करने की कोशिश कर रहा हूं। मैं आइटम प्रदर्शित किया जा रहा है, लेकिन प्रत्येक दृश्य का टेक्स्ट कट जाता है और पूरे रेमंड तो जैसे टूलबार को कवर किया जाता है:फ्रैगमेंट सामग्री ओवरलेइंग टूलबार
जैसा कि आप देख सकते हैं, वहाँ तीन TextViews हैं। उनका टेक्स्ट आधा रास्ते काट दिया गया है और यह टूलबार को ओवरले कर रहा है (कोई शीर्षक मुझे नहीं पता)। TextView आइटम लेआउट एक RecyclerView लेआउट के भीतर निहित हैं, जो टुकड़े का लेआउट है। अभिभावक गतिविधि में फ़्रेमलेआउट -> टूलबार, फ़्रेमलाउट है। मैं गतिविधि के उप फ्रेमलेआउट में टुकड़ा डाल रहा हूं। यहाँ एक्सएमएल है:
रेमंड का प्रत्येक दृश्य:
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="match_parent"
android:layout_height="48dp"
android:fontFamily="sans-serif"
android:paddingTop="16dp"
android:paddingBottom="20dp"
android:textSize="16sp"/>
रेमंड लेआउट, जो टुकड़ा के लेआउट है:
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/recycler_tasks"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="stuff.MainActivity$TaskFragment">
</android.support.v7.widget.RecyclerView>
और माता पिता गतिविधि के लेआउट:
<FrameLayout 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:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:ignore="MergeRootFrame">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</FrameLayout>
मुझे पता है कि यह कुछ आसान होना चाहिए, लेकिन मुझे थोड़ी देर के लिए इस पर फंस गया है, विभिन्न चीजों को कोई एवा नहीं इल।
यह सही जवाब होना चाहिए करने के लिए ... – josemigallas