Question: There are a activity what I want to fill the screen in a phone
and pop up(dialog) for a tablet.

I thought I make a layout file like this, 

```
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="@dimen/main_layout_width"
  android:layout_height="match_parent">

```

and externalize the value of width as

in values/dimens.xml

```
<dimen name="tutorial_width">match_parent</dimen>

```

in values-xlarge/dimens.xml

```
<dimen name="tutorial_width">320dp</dimen>

```

But I can't representation 'match\_parent' as dimen element.
Any help? Thanks!

Answer: 
I used a style to fix this problem. Having separate xml style elements with android:layout\_width items for different screen sizes solved the problem without using the undocumented -1dp
Whats works for me and probably features academic correctness is something like this:

```
<!-- In values/dimens.xml -->
<item name="width_match_unless_huge" type="dimen" format="integer">-1</item>

<!-- In values-sw600dp/dimens.xml -->
<item name="width_match_unless_huge" type="dimen" format="dimension">600dp</item>

```

This allows you to mix sizing behavior constants like `MATCH_PARENT` and concrete sizes in **dp** depending on the current configuration.

You would use it as a regular `<dimen/>`:

```
<LinearLayout
    android:layout_width="@dimen/width_match_unless_huge"
    .../>

```