Question: I have two parsers `parser1 :: Parser a` and `parser2 :: Parser a`.

I would like now to parse a list of `a`s interspersing them with `parser2`

The desired signature is something like

```
interspersedParser :: Parser b -> Parser a -> Parser [a]

```

For example, if `Parser a` parses the `'a'` character and `Parser b` parser the `'b'` character, then the `interspersedParser` should parse

```
""
"a"
"aba"
"ababa"
...

```

I'm using megaparsec. Is there already some combinator which behaves like this, which I'm currently not able to find?

Answer: 
If you want to correctly scale to all screens on anything; My best rules are using ScrollView and RelativeLayout/ConstraintLayout in general so it's usable and scales. 

You can choose between ConstraintLayout and RelativeLayout; Both should scale correctly, perhaps Relative is easier since you don't have to set the constraints. ScrollView isn't necessarily needed here since we don't have a lot of data. 

Try putting your Switch inside a RelativeLayout/ConstraintLayout and it should work.

```
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <Switch
                    android:id="@+id/btndegreerad"
                    style="?android:attr/borderlessButtonStyle"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="2"
                    android:background="@drawable/degree_rad_track"
                    android:showText="true"
                    android:switchTextAppearance="@style/SwitchTextTheme"
                    android:textAppearance="@style/TextAppearance.AppCompat.Body1"
                    android:textOff="@string/btnrad"
                    android:textOn="@string/btndegree"
                    android:thumb="@drawable/degree_rad_thumb"
                    android:thumbTextPadding="@dimen/_3sdp"
                    android:thumbTint="@color/colorSwitch"
                    android:track="@drawable/degree_rad_track" />

            </RelativeLayout>

        </LinearLayout>

```

Note: Customise the layouts as you want

Hope it helps.
I am currently working on a similar layout using Switch with custom drawable for its thumb and track. From what I have learned, LinearLayout weight property can affect your Switch track's drawable (either cropped or squished) if your device width doesn't provide enough room.

With this unwanted behavior, I recommend changing your layout type to [ConstraintLayout](https://developer.android.com/training/multiscreen/screensizes#ConstraintLayout) if you really need to get your custom drawable working on different screen sizes. This solution is also recommended in this [guide](https://developer.android.com/training/multiscreen/screensizes).

But if you really want to use LinearLayout, don't use `layout_weight` for your Switch.