Question: I have widget with following info:

```
<appwidget-provider
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:minWidth="328dp"
    android:minHeight="56dp"
    android:updatePeriodMillis="1000000"
    android:initialLayout="@layout/home_widget"
    android:previewImage="@drawable/widget_preview"
    android:resizeMode="horizontal"
    android:widgetCategory="home_screen">
</appwidget-provider>

```

The layout (not necessary to put it here) looks good on my device, but I found out that the widget is not applicable for smaller screen. Can somebody help me solve this issue? Instead of not displaying this widget on smaller devices, I would like to alter the layout (maybe create another xml layout for it). I tried putting `minWidth` to dimens, but as I have all the widget elements positioned and sized precisely, this approach would cut the widget. Thanks for any help.

Answer: 
becuase of we use diffrent screen size and diffrent density of the screen to solve this dont use dp or sp rather than use sdp or ssp which is provide in this library
<https://github.com/intuit/sdp>

And this make your space preamter screen responsive
As mentioned above, **different phones got different screen sizes** so when using a fixed size value (`328dp` for example) your layout may not be responsive to all devices.

---

*Naman's* answer will work for you, you can use something like this:

```
<view
    android:layout_height="@dimen/_100sdp"
    android:width="@dimen/_100sdp" />

```

But you can also use [ConstraintLayout](https://developer.android.com/training/constraint-layout) to tell your views how to spread on your screen with percents, like this:

```
 <view
    android:layout_height="0dp"
    android:layout_width="0dp"
    app:layout_constraintHeight_percent="0.2"
    app:layout_constraintWidth_percent="0.3"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

```

With this solution, your view will be equal to `30%` of the screen width, `20%` of its height and will remain responsive to all screen sizes.