Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0c3c919

Browse files
Make gradlew executable on unix and sort remote settings by name
Fixes #22
1 parent e9273a7 commit 0c3c919

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

‎app/src/main/java/org/pyload/android/client/fragments/SettingsFragment.java‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.pyload.android.client.fragments;
22

33
import java.util.ArrayList;
4+
import java.util.Collections;
5+
import java.util.Comparator;
46
import java.util.Map;
57
import java.util.Map.Entry;
68

@@ -148,8 +150,18 @@ public SettingsAdapter(pyLoadApp app) {
148150
data = new ArrayList<Entry<String, ConfigSection>>();
149151
}
150152

153+
class SettingsComparator
154+
implements Comparator<Entry<String,ConfigSection>> {
155+
156+
@Override
157+
public int compare(Entry<String, ConfigSection> lhs, Entry<String, ConfigSection> rhs) {
158+
return lhs.getKey().compareTo(rhs.getKey());
159+
}
160+
}
161+
151162
public void setData(Map<String, ConfigSection> map) {
152163
this.data = new ArrayList<Entry<String, ConfigSection>>(map.entrySet());
164+
Collections.sort(data, new SettingsComparator());
153165
notifyDataSetChanged();
154166
}
155167

‎gradlew‎

100644100755
File mode changed.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /