0

I have a Fragment page when my items are placed at the bottom of the page and half of them are cropped

enter image description here

this code Fragment

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!--<android.support.v7.widget.RecyclerView-->
        <!--android:id="@+id/Recycler"-->
        <!--android:layout_width="match_parent"-->
        <!--android:layout_height="match_parent"-->
        <!--android:layout_marginRight="10dp"-->
        <!--android:layout_marginLeft="10dp"/>-->

    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Save"
        android:textColor="@color/colorWhite"
        android:background="@color/colorBlue"
        android:textSize="20dp"
        android:layout_alignParentBottom="true"/>

</RelativeLayout>

this code Activity

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorWhite">

    <FrameLayout
        android:id="@+id/Fragment_Main"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    </FrameLayout>

    <android.support.v7.widget.Toolbar
        android:id="@+id/main_toolBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorCenteral"
        android:layoutDirection="rtl"
        android:minHeight="?attr/actionBarSize"
        android:theme="@style/ToolBarStyle" />

</RelativeLayout>
2
  • I think the issue is on your activity layout. Also, include it in your question. Jul 10, 2019 at 14:16
  • enclose your parentLayout with a ScrollView.
    – Molly
    Jul 11, 2019 at 7:17

1 Answer 1

1

please Add this code to res>values>styles.xml

<resources>
    <style name="AppTheme.NoActionBar">
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="android:windowFullscreen">true</item>
        <item name="android:windowContentOverlay">@null</item>
    </style>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>

and edit AndroidManifest.xml

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar">

You must use @style/AppTheme.NoActionBar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.