Preferences

Juha Kuitunen avatarJuha Kuitunen created an issue

I think we should create new Activity for preferences. So far I have 2 things in mind which should be included there

  1. Adjust number of displayed changesets, see Issue #40
  2. Override language settings. Someone might want to use this app in e.g. English instead of his native language.

I've found an example of supporting PreferenceFragment on API Level 11+ and classic preferences on older versions of Android. See https://github.com/commonsguy/cw-omnibus/tree/master/Prefs/FragmentsBC

For overriding language we can try this http://www.tutorialforandroid.com/2009/01/force-localize-application-on-android.html

Comments (4)

  1. Juha Kuitunen

    Tobias Duehr

    What do you think if I change

    settings = getSharedPreferences("bitbeaker", 0);
    

    in Bitbeaker.java:onCreate() to

    settings = PreferenceManager.getDefaultSharedPreferences(this);
    

    This would make it easier to handle settings in separate Activity. It seems that only preferences file name is changing from bitbeaker to com.saibotd.bitbeaker_preferences

    ref: http://stackoverflow.com/q/5946135/262462

    Alternative is to add this

    PreferenceManager prefMgr = getPreferenceManager();
    prefMgr.setSharedPreferencesName("bitbeaker");
    prefMgr.setSharedPreferencesMode(MODE_PRIVATE);
    

    to onCreate of SettingsActivity but it uses deprecated code.

  2. Ville Saalo

    I guess the new preferences activity could also be used to select a default view for when you open the app: whether to go to a certain repository, to the list of your own repositories, or perhaps to a searching mode. And if you choose some default repository, you could also choose which view to have as the default one there: newest changesets or issues. This isn't a request though, just some ideas. ;)

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.