तो मैं एक लेआउट जो निम्नलिखित के समान दिखता है:एंड्रॉयड: ऊंचाई FragmentTransactions
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_height="wrap_content"
android:elevation="4dp"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"/>
<FrameLayout
android:id="@+id/content"
android:layout_below="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
यह मेरा गतिविधि के लिए मेरी आधार लेआउट फ़ाइल रूपों और उसके बाद मैं विभिन्न टुकड़े के लिए FrameLayout बाहर स्वैप। ऐसा ही एक टुकड़ा इस तरह एक लेआउट है:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<SlidingTabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:elevation="4dp"
android:layout_height="wrap_content"/>
<android.support.v4.view.ViewPager
android:id="@+id/profileViewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/sliding_tabs"
android:background="@android:color/white"/>
<FloatingActionButton
android:id="@+id/floatingButton"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"/>
</RelativeLayout>
मैं उम्मीद होती है कि के रूप में मैं निर्धारित किया है 4dp होने के लिए दोनों टूलबार और SlidingTabLayout के उन्नयन, कि उपकरण पट्टी टैब पर एक छाया नहीं होता, फिर भी यह होता है:
आदर्श रूप में मैं कोड में टूलबार की ऊंचाई की स्थापना होने के लिए नहीं करना चाहते - अगर वहाँ टूलबार एक छाया कास्टिंग को रोकने के लिए एक तरीका है किसी को पता है? मैं मानता था कि दोनों विचार 4 डीपी ऊंचाई पर हैं, भले ही वे एक ही लेआउट में नहीं हैं, कोई छाया नहीं डाली जाएगी।
सहायता के लिए धन्यवाद।
एंड्रॉइड बग के लिए टिकट यहां दिया गया है: https://code.google.com/p/android/issues/detail?id=82041 – Stanislav