In my project have custom view has fixed width.The width is specified in values->dimen
<dimen name="layout_width">75dp</dimen>
The issue is that in some device(eg:Pixel) with resolution 1080 X 1920 this view is Clipped. However some other devices(eg:Pixel2) with same resolution everything works fine.
Have tried using different dimension files as in this post .Both these device are picking from same dimen files
Code
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="21dp"
android:gravity="center"
android:orientation="vertical">
<RelativeLayout
android:layout_width="55dp"
android:layout_height="55dp"
>
<ImageView
android:id="@+id/icon"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerInParent="true"
tools:background="@drawable/icon" />
</RelativeLayout>
<TextView
android:id="@+id/title"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginTop="20dp"
android:gravity="center"
/>
</LinearLayout>