Merge branch 'master' of git://gitorious.org/f-droid/fdroidclient
This commit is contained in:
commit
39929028e7
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,3 +7,6 @@ gen/*
|
||||
proguard.cfg
|
||||
proguard-project.txt
|
||||
*~
|
||||
.idea
|
||||
*.iml
|
||||
out
|
||||
|
BIN
libs/android-support-v4.jar
Normal file
BIN
libs/android-support-v4.jar
Normal file
Binary file not shown.
BIN
res/drawable-hdpi/ic_menu_refresh.png
Normal file
BIN
res/drawable-hdpi/ic_menu_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
res/drawable-ldpi/ic_menu_refresh.png
Normal file
BIN
res/drawable-ldpi/ic_menu_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
res/drawable-mdpi/ic_menu_refresh.png
Normal file
BIN
res/drawable-mdpi/ic_menu_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
res/drawable-xhdpi/ic_menu_refresh.png
Normal file
BIN
res/drawable-xhdpi/ic_menu_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
@ -24,6 +24,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
@ -135,7 +136,7 @@ public class AppDetails extends ListActivity {
|
||||
buildtype.setText("bin");
|
||||
}
|
||||
TextView added = (TextView) v.findViewById(R.id.added);
|
||||
if (apk.added != null && apk.added != null) {
|
||||
if (apk.added != null) {
|
||||
added.setVisibility(View.VISIBLE);
|
||||
added.setText(df.format(apk.added));
|
||||
} else {
|
||||
@ -462,17 +463,18 @@ public class AppDetails extends ListActivity {
|
||||
if (app == null)
|
||||
return true;
|
||||
DB.Apk curver = app.getCurrentVersion();
|
||||
List<MenuItem> toShow = new ArrayList<MenuItem>(2);
|
||||
if (app.installedVersion != null && curver != null
|
||||
&& !app.installedVersion.equals(curver.version)) {
|
||||
menu.add(Menu.NONE, INSTALL, 0, R.string.menu_update).setIcon(
|
||||
android.R.drawable.ic_menu_add);
|
||||
toShow.add(menu.add(Menu.NONE, INSTALL, 0, R.string.menu_update).setIcon(
|
||||
R.drawable.ic_menu_refresh));
|
||||
}
|
||||
if (app.installedVersion == null && curver != null) {
|
||||
menu.add(Menu.NONE, INSTALL, 1, R.string.menu_install).setIcon(
|
||||
android.R.drawable.ic_menu_add);
|
||||
toShow.add(menu.add(Menu.NONE, INSTALL, 1, R.string.menu_install).setIcon(
|
||||
android.R.drawable.ic_menu_add));
|
||||
} else {
|
||||
menu.add(Menu.NONE, LAUNCH, 1, R.string.menu_launch).setIcon(
|
||||
android.R.drawable. ic_media_play);
|
||||
toShow.add(menu.add( Menu.NONE, LAUNCH, 1, R.string.menu_launch ).setIcon(
|
||||
android.R.drawable.ic_media_play));
|
||||
menu.add(Menu.NONE, UNINSTALL, 1, R.string.menu_uninstall).setIcon(
|
||||
android.R.drawable.ic_menu_delete);
|
||||
}
|
||||
@ -494,7 +496,9 @@ public class AppDetails extends ListActivity {
|
||||
menu.add(Menu.NONE, DONATE, 6, R.string.menu_donate).setIcon(
|
||||
android.R.drawable.ic_menu_view);
|
||||
}
|
||||
|
||||
for (MenuItem item : toShow) {
|
||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.Vector;
|
||||
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import org.fdroid.fdroid.DB.App;
|
||||
import org.fdroid.fdroid.R;
|
||||
|
||||
@ -150,12 +151,13 @@ public class FDroid extends TabActivity implements OnItemClickListener,
|
||||
android.R.drawable.ic_menu_rotate);
|
||||
menu.add(Menu.NONE, MANAGE_REPO, 2, R.string.menu_manage).setIcon(
|
||||
android.R.drawable.ic_menu_agenda);
|
||||
menu.add(Menu.NONE, SEARCH, 3, R.string.menu_search).setIcon(
|
||||
MenuItem search = menu.add(Menu.NONE, SEARCH, 3, R.string.menu_search).setIcon(
|
||||
android.R.drawable.ic_menu_search);
|
||||
menu.add(Menu.NONE, PREFERENCES, 4, R.string.menu_preferences).setIcon(
|
||||
android.R.drawable.ic_menu_preferences);
|
||||
menu.add(Menu.NONE, ABOUT, 5, R.string.menu_about).setIcon(
|
||||
android.R.drawable.ic_menu_help);
|
||||
MenuItemCompat.setShowAsAction(search, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.text.format.DateFormat;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@ -149,10 +150,11 @@ public class ManageRepo extends ListActivity {
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
|
||||
super.onCreateOptionsMenu(menu);
|
||||
menu.add(Menu.NONE, ADD_REPO, 1, R.string.menu_add_repo).setIcon(
|
||||
MenuItem item = menu.add(Menu.NONE, ADD_REPO, 1, R.string.menu_add_repo).setIcon(
|
||||
android.R.drawable.ic_menu_add);
|
||||
menu.add(Menu.NONE, REM_REPO, 2, R.string.menu_rem_repo).setIcon(
|
||||
android.R.drawable.ic_menu_close_clear_cancel);
|
||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user