Почему какая-то часть моего пользовательского интерфейса Android-приложения обрезается? - PullRequest
0 голосов
/ 23 мая 2018

Я использую следующие темы для своего приложения.Но я не могу выяснить причину, по которой какая-то часть обрезается.

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>     
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>  
        <item name="colorAccent">@color/colorAccent</item>  
        <item name="alertDialogTheme">@style/MyAlertDialogStyle</item>  
        <item name="alertDialogStyle">@style/MyAlertDialogStyle</item>  
        <item name="android:windowBackground">@drawable/background_splash</item> 

    </style>

Вот скриншот пользовательского интерфейса моего приложения.Границы сторон обрезаны.

The border side of my app user interface is cropped.

Вот моя активность_XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
    android:background="@color/White"
    tools:context="com.ff.foodbio.MainActivity">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <RelativeLayout
            android:id="@+id/reloadLayout"
            android:layout_width="match_parent"
            android:background="#000"
            android:layout_height="45dp">

            <ImageView
                android:id="@+id/btnReload"
                android:layout_width="20dp"
                android:layout_height="match_parent"
                android:layout_marginLeft="20dp"
                android:src="@drawable/reload"
                android:layout_alignParentLeft="true"
                android:tint="#fff"
                android:visibility="gone"
                android:scaleType="fitCenter"/>
            <TextView
                android:layout_width="fill_parent"
                android:layout_height="match_parent"
                android:layout_toRightOf="@+id/btnReload"
                android:layout_toLeftOf="@+id/settings"
                android:textSize="20sp"
                android:textColor="#fff"
                android:gravity="center"
                android:visibility="gone"
                android:text="Food BIO"/>

            <ImageView
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:src="@drawable/foodbio_text"
                android:layout_centerInParent="true"
                android:gravity="center"/>

            <ImageView
                android:id="@+id/settings"
                android:layout_alignParentRight="true"
                android:layout_width="30dp"
                android:layout_marginRight="20dp"
                android:layout_height="match_parent"
                android:tint="#fff"
                android:src="@drawable/menu"
                android:scaleType="fitCenter"/>

        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/tabLayout"
            android:layout_width="wrap_content"
            android:layout_height="55dp"
            android:background="@color/Black"
            android:layout_below="@+id/reloadLayout">

            <android.support.v7.widget.RecyclerView
                android:id="@+id/tabRecyclerView"
                android:layout_width="wrap_content"
                android:clipToPadding="false"
                android:background="@color/Black"
                android:layout_height="match_parent">

            </android.support.v7.widget.RecyclerView>

        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/separatorBar"
            android:layout_width="match_parent"
            android:layout_below="@+id/tabLayout"
            android:layout_marginTop="-2dp"
            android:layout_height="5dp">

        </RelativeLayout>

        <FrameLayout
            android:id="@+id/root_fragment_one"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@+id/separatorBar">

        </FrameLayout>

    </RelativeLayout>

</FrameLayout>

Я не смог найти проблему.Что не так с моим кодом?
Как я могу решить эту проблему?

...