diff options
author | nebkat <nebkat@teamhacksung.org> | 2012-12-24 11:54:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-12-29 01:47:53 -0800 |
commit | 1671eead0b0c5e02092ffef784a7dea21062eda0 (patch) | |
tree | d40fb67c77d9cd9d60c1e4afb98f1989e1d53a80 /src/com/cyanogenmod | |
parent | b3f3d696b96de44db7a2399096967424c61b5101 (diff) | |
download | packages_apps_trebuchet-1671eead0b0c5e02092ffef784a7dea21062eda0.zip packages_apps_trebuchet-1671eead0b0c5e02092ffef784a7dea21062eda0.tar.gz packages_apps_trebuchet-1671eead0b0c5e02092ffef784a7dea21062eda0.tar.bz2 |
Preferences: Koush steals yachts
"WHY ARE YOU UP AT 3AM!!!!"
Preferences will get added if it is 3AM.
<cdesai> settings seem small
<cdesai> the size of preferences
<nebkat> what am I supposed to do?
<nebkat> fill the space with "koush steals yachts"?
<cdesai> nebkat: let's see how many -2/+2s you get
Before: https://docs.google.com/open?id=0BxOgOTemh7G7QktJT1NQamF5b0k
After: https://docs.google.com/open?id=0BxOgOTemh7G7STV3dFRkUExFclE
Change-Id: I20b1ba61b9ebafbc7bebbb09fec325a27bf76e06
Diffstat (limited to 'src/com/cyanogenmod')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/preference/Preferences.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/trebuchet/preference/Preferences.java b/src/com/cyanogenmod/trebuchet/preference/Preferences.java index 8b18e2a..dc86cdb 100644 --- a/src/com/cyanogenmod/trebuchet/preference/Preferences.java +++ b/src/com/cyanogenmod/trebuchet/preference/Preferences.java @@ -37,7 +37,9 @@ import android.widget.TextView; import com.cyanogenmod.trebuchet.LauncherApplication; import com.cyanogenmod.trebuchet.R; +import java.util.Calendar; import java.util.List; +import java.util.Random; public class Preferences extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener { @@ -68,6 +70,7 @@ public class Preferences extends PreferenceActivity @Override public void onBuildHeaders(List<Header> target) { loadHeadersFromResource(R.xml.preferences_headers, target); + updateHeaders(target); } @@ -76,6 +79,20 @@ public class Preferences extends PreferenceActivity while (i < headers.size()) { Header header = headers.get(i); + if (header.id == R.id.preferences_general_section) { + Calendar calendar = Calendar.getInstance(); + Log.e(TAG, Integer.toString(calendar.get(Calendar.HOUR_OF_DAY))); + if (calendar.get(Calendar.HOUR_OF_DAY) == 3) { + String[] strings = getResources().getStringArray(R.array.preferences_koush); + Random random = new Random(); + for (int j = 0; j < 20; j++) { + Header h = new Header(); + h.title = strings[random.nextInt(strings.length)]; + headers.add(i + 1, h); + } + } + } + // Version preference if (header.id == R.id.preferences_application_version) { header.title = getString(R.string.application_name) + " " + getString(R.string.application_version); |