TheOldBlackbeard
TheOldBlackbeard

Reputation: 423

Turn Preference Screen into Button on/of interface

My app has a Preference Screen that looks like this:

Current preference screen

But I need to create a new interface that look more like this:

Preference screen desired

So a kind of button using on/off interface.

Is there somehow a way to convert, by editing the code, the previous interface to the new one (for example to change the SwitchPreferences to Buttons and align them in the PreferenceScreen as shown in the 2nd image) or is it not possible and I should start from scratch?

Upvotes: 1

Views: 82

Answers (1)

wareisjared
wareisjared

Reputation: 410

There is no automated tool that can be used for conversion of a screen to another screen. The best bet would be to reuse code but start with a new activity layout and implement the old code into the new format.

To best achieve the look of the second image, I would recommend using a custom horizontal LinearLayout paired with a vertical LinearLayout, this way you can have a grid (e.g. 4 by 2)

Upvotes: 2

Related Questions