Settings: Allow smaller SlimPIE sizes + multiDpi fixes (2/2)

Due team, user and kanger wishes I needed to do again something :p
Hopefully now really the last thing :D Is now in full range as well usable
for higher dpi then our stock dpi

This commit does:
- allow bigger size range for SlimPIE layout
- icon are now resized on smaller sizes (only then) then default size
  which allows much smaller overall size
- slight better positiong of the icons in the button item
- Fix: reported issues custom Icons are sometimes to small
- Fix: reported issue that estimated container size took not PIE_SIZE
  into account (follows now on every dpi and size the activation point)
- Fix: Settings style seekbar resets sometimes to last setted value
- Settings: a bit code rearrangement (not needed but I was bored :p)

And now really finished :p

cheers

Change-Id: I6917830262f1c1bf31f0175368daa7d9e187ad9c

Conflicts:
	src/com/android/settings/cyanogenmod/PieStyleSettings.java
Settings: revert to our old default size (2/2)

played so much with the stock dpi values to optimize that
I set the default value for our slim dpi a bit to low :p

Roms which use stock phon dpi can leaver it like it is

But should kang the correspondent frameworks patch which
allows more flexible size changes

cheers

Change-Id: Id251862be544e2408d8059037708ee84868f6b87

Conflicts:
	src/com/android/settings/cyanogenmod/PieStyleSettings.java
Settings: SlimPie do not got through onPreferenceChange every time

Change-Id: I4ae86f10829ee2c2057e4079d5d25363bb478719

Conflicts:
	src/com/android/settings/cyanogenmod/PieStyleSettings.java
Settings: reduce SlimPie observer footprint (2/2)

time for code cleanup projects. Switch to same
logic we already use in QS/NT shortcuts. Use
only one string for the whole SlimPie config
This reduces massive the observer footprint.

cheers

Change-Id: I967baabd09e6c85b8e857f8f57a096b9b8d48b92
Settings: complete overhaul/optimizing + drag drop sort + easy dev life

This patch introduces a tons off changes. Let me first describe the easy ones

- resorting and reordering of our settings to do not have redundant entries like we had
- centralize and remove duplicate code
- complete UI overhaul

and now the main point. A wish for every dev is as easy as possible to get an UI interface
for a new feature without coding much. So I introduce now a central drag drop and swipe list
class and fragment to get this (THANK A BUNCH TO CARL BAUER FOR THE drag sort and swipe classes
which are modified the base of this)

Doing bunch off code in frameworks and settings to handle the new feature you do not need anymore.

So how does it work......as usual the dev is doing the frameworks part stuff....doing this
the dev need to add in the central frameworks ButtonsHelper class (or can be as well a new one)
2 methods to get and put the settings value for this patch (check ButtonsHelper.java in frameworks
how this works...only some lines off code).
So now the dev needs to represent this in settings with a list for the user to handle it. This
can be done with less then 20 line code changes. Just call the fragment eg like this:

            <PreferenceScreen
                    android:key="navbar_targets_settings"
                    android:fragment="com.android.settings.slim.dslv.ButtonsListViewSettings"
                    android:title="@string/navbar_targets_title">
                <extra android:name="buttonMode" android:value="3" />
                <extra android:name="maxAllowedButtons" android:value="5" />
                <extra android:name="actionValues" android:value="shortcut_action_navring_values" />
                <extra android:name="actionEntries" android:value="shortcut_action_navring_entries" />
                <extra android:name="fragment" android:value="com.android.settings.slim.fragments.NavbarButtonFragment" />
            </PreferenceScreen>

so what do the extra values mean....you can set following available value (if not set default is used)

<extra android:name="maxAllowedButtons" android:value="5" />
-  how much entries are max allowed to add till the user get a warning (default is 5)

<extra android:name="actionValues" android:value="shortcut_action_navring_values" />
- which array values should be used for this feature from array.xml (default is shortcut_action_values)

<extra android:name="actionEntries" android:value="shortcut_action_navring_entries" />
- which array entries should be used for this feature from array.xml (default is shortcut_action_entries)

<extra android:name="fragment" android:value="com.android.settings.slim.fragments.NavbarButtonFragment" />
- you want a fragment showed on top of the list (like color settings or whatever just specify the fragment you want to have
  default is none

<extra android:name="disableLongpress" android:value="true" />
- your feature does not support longpress...turn it off so that the user cannot choose an longpress option (default is true)

<extra android:name="useAppPickerOnly" android:value="true" />
- you do not want to use an action array list like above and only an app picker.....turn it on (default is false)

<extra android:name="disableIconPicker" android:value="true" />
- you do not want that the user can change the icon of your feature (can choose between system icon/gallery icon/default).....turn it on (default is false)

<extra android:name="disableDeleteLastEntry" android:value="true" />
- you do not want that the user can delete the last entry (eg for navbar or pie usefull).....turn it on (default is false)

and last one which is the only value which need to be specified!!!!!!!
<extra android:name="buttonMode" android:value="3" />
- this says the ButtonListView fragment which method it should use in frameworks to get the provider values and this is the only java change you need
to do in settings. just to add 3 lines off code into ButtonsListView.java (check getConfig and setConfig Method....very easy)

So......what to do.....add the xml entry with the options you want to have.....add 3 lines off java code....and do not care...all other is
working automatically. As well in frameworks you have methods in ButtonsJavaHelper.java which gives you all that information back without
taking care of formating handling or whatever usually needs to be done. Easy example....you need the drawable for this action or app or whatever
was saved (maybe gallery maybe system icon or default icon) just call the ButtonsHelper.getButtonIconImage method and you get the drawable the user
want. You do not need to take care at all about it. You need the action or the description the user saved? no problem just call the get method
in ButtonsHelper class and you get a arraylist off buttonconfig object with all information you need (the handle off formating and convert
the objects into just one provider settings value happens all in background automatically). As well (for descripton) already well
formated....etc etc. So at least you do not have to take care on the settings....you do not have to take care of how I save best my values
in provider....just do your feature and get the information you want from central classes and methods which helps you which gives you a ButtonsConfig arraylist
back which contains all information you need.

More to see on frameworks com/android/internal/util/slim

ButtonsHelper
ButtonsConstants
ButtonsConfig

You want a demonstration....tooo lazy to do a video....just download or compile slim and try it out...drag drop sort...swipe away like
gmail.....all is possible. :p

you can see currently this feature
on Navbar buttons, Pie buttons (normal and second layer), Navring, lockscreen shorcuts, notification shortcuts

have fun and cheers

SlimRoms

Change-Id: Iaa6b09f0b6ac7167d2c5b7f291f4379d90e6c598

Conflicts:
	AndroidManifest.xml
	res/menu/nav_bar_style.xml
	res/menu/nav_bar_style_dimen.xml
	res/menu/ram_bar.xml
	res/values/attrs.xml
	res/values/cm_arrays.xml
	res/values/cm_strings.xml
	res/xml/nav_bar_style.xml
	res/xml/system_ui_settings.xml
	src/com/android/settings/cyanogenmod/DensityChanger.java
	src/com/android/settings/cyanogenmod/NavBarStyle.java
	src/com/android/settings/cyanogenmod/RamBar.java
	src/com/android/settings/cyanogenmod/UserInterface.java