I try to run my app in real device and facing this problem:
It looks like this in emulator
Textview with id textViewSignUpForAccount is displaying in preview but not on emulator and real device.
what should be the problem?
I tried hours fixing this issue but no success.
here I am placing my code for the layout:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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=".NotificationActivity">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="85dp"
android:background="#FFFFFF"
app:layout_constraintBottom_toTopOf="@id/linearLayout">
<androidx.appcompat.widget.Toolbar
android:id="@+id/notification_frag_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:background="@color/white"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<TextView
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="45dp"
android:text="All activity"
android:textColor="@color/black"
android:textSize="16sp" />
</androidx.appcompat.widget.Toolbar>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="@color/iron" />
</RelativeLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="160dp"
android:orientation="vertical"
android:paddingLeft="24dp"
android:paddingRight="24dp"
app:layout_constraintTop_toBottomOf="@id/relativeLayout" >
<ImageView
android:id="@+id/imageViewProfileIcon"
android:layout_width="wrap_content"
android:layout_height="72dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="2dp"
android:layout_marginBottom="12dp"
android:src="@drawable/inboxicon" />
<TextView
android:id="@+id/textViewSignUpForAccount"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="Messages and notifications will appear here"
android:textAllCaps="false"
android:textSize="16sp" />
<!-- Signup Button -->
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_signup_in_notificationsActivity"
android:layout_width="290dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:layout_marginBottom="24dp"
android:background="@color/primary"
android:padding="12dp"
android:text="Sign up"
android:textAllCaps="false"
android:textColor="@color/white" />
</LinearLayout>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/linearLayout">
<!-- Main content -->
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/primary"
app:itemIconTint="@drawable/selector"
app:itemTextColor="@drawable/selector"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>