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: 
Screen density is not same for all devices, hence a best solution is to introduce `ssp` and `sdp` instead of `dp` which is fixed for all devices `ssp` is used for setting size to text and [sdp](https://github.com/intuit/sdp) is used for layouts.

<https://github.com/intuit/sdp>
If you want widget width match as parent then you can use the `android:layout_width="match_parent"`

`match_parent` defines the width/height as match of parent, there is not any need to define the static dimen. It is adjust the width according to parent's width. 

I hope its work for you.