私は、小規模なプロジェクトに取り組んでいると、突然、レイアウトプレビューのすべてが画面から出てくるmisbehaving.Itsを開始した画面から出てきます。それはレイアウトの高さや幅の場合ではない!あなたはこれらのイメージAndroidのレイアウトは、レイアウトプレビュー
これが第二の画像であるとの鮮明な画像を得ることができます:それは非常に明確である
青色の境界線が画面の外に来ています。
私はSOにこの質問を見つけたが、それは私の質問には関係ありません。
これらは私が
を試した事が- 清潔で、プロジェクトが「
- 無効化キャッシュを働いていたし、あまりにも避難所のAndroidメーカーを再起動していないプロジェクトを再構築
- を働いていないことを確認しますtが働いた:/
これはACTIVのXMLコードであります
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="bk.photoorganizer.DetailsActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/photos_rec_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_gravity="bottom|end"/>
</android.support.design.widget.CoordinatorLayout>
ity_details.xmlこれはactivity_main.xmlのXMLコードです:事前に
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="bk.photoorganizer.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorColor="#ffffff"
app:tabIndicatorHeight="2dp"
app:tabSelectedTextColor="#ffffff"
app:tabTextAppearance="@style/tabText"
app:tabTextColor="#63FFFFFF"
/>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
おかげで...
xmlコードを投稿するとよいでしょう。 – Ibrahim
は必ず使用RelativeLayoutの代わりCoordinatorLayout @bharath – bharath
..秒お待ちください。 – yash786