forked from androportal/aakash_bazaar_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchanges_in_fdroid.txt
107 lines (78 loc) · 3.47 KB
/
changes_in_fdroid.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
1. changing minimum sdk requirement
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="15" />
required to change the theme of the fdroid app.
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"
2. added an option for uploading APKs.
line 53: public static final int REQUEST_UPLOADAPK = 3;
line 57-62: private static final int UPDATE_REPO = Menu.FIRST;
private static final int MANAGE_REPO = Menu.FIRST + 1;
private static final int UPLOAD_APK = Menu.FIRST + 2;
private static final int PREFERENCES = Menu.FIRST + 3;
private static final int ABOUT = Menu.FIRST + 4;
private static final int SEARCH = Menu.FIRST + 5;
line 122-123: menu.add(Menu.NONE, UPLOAD_APK, 4, R.string.menu_upload_apk).setIcon(
android.R.drawable.ic_menu_upload);
line 147-176: case UPLOAD_APK:
LayoutInflater liapk = LayoutInflater.from(this);
View viewapk = liapk.inflate(R.layout.uploadapk, null);
WebView uploadApk = (WebView) viewapk
.findViewById(R.id.wvUploadApk);
uploadApk.getSettings().setJavaScriptEnabled(true);
uploadApk.getSettings().setLoadWithOverviewMode(true);
uploadApk.getSettings().setUseWideViewPort(true);
uploadApk.setWebViewClient(new ourViewClient());
/*
* address should be that of the login page for filling up the
* credentials of the developer who wants to host his apk on the
* akash bazaar repo
*/
try {
uploadApk.loadUrl("http://www.dropbox.com");
} catch (Exception e) {
e.printStackTrace();
}
Builder p1 = new AlertDialog.Builder(this).setView(viewapk);
final AlertDialog alrts = p1.create();
alrts.setIcon(R.drawable.ic_menu_upload);
alrts.setTitle(getString(R.string.upload_apk_title));
alrts.show();
return true;
added uploadapk.xml to the ~/workspace/fdroid/res/layout
3. AppListManager.java
line 97-98: categories.add(categoryAll);
categories.add(categoryWhatsNew);
line 106: currentCategory = categoryAll;
this will set the default view to all instead of What's New in the original FDroid.
4. AvailableAppsFragment.java
line 19-50: view.setOrientation(LinearLayout.HORIZONTAL);
view.setWeightSum(1f);
ListView lvCategories = new ListView(getActivity());
// Giving it an ID lets the default save/restore state
// functionality do its stuff.
lvCategories.setId(R.id.categoryListView);
lvCategories.setAdapter(getAppListManager().getCategoriesAdapter());
lvCategories.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {
String category = parent.getItemAtPosition(pos).toString();
getAppListManager().setCurrentCategory(category);
}
});
LinearLayout.LayoutParams p1 = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
p1.weight = 0.7f;
view.addView(lvCategories, p1);
ListView list = createAppListView();
view.setAppList(list);
LinearLayout.LayoutParams p2 = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT);
p2.weight = 0.3f;
view.addView(list, p2);
AppListManager.java
line 57-60: categories = new ArrayAdapter<String>(activity,
android.R.layout.simple_list_item_1, new ArrayList<String>());
// categories
// .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);