1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 19:42:17 +02:00

code cleanup: unused code has been removed

This commit is contained in:
Nikolay Pultsin 2010-10-15 22:58:07 +01:00
parent 9d919fb7a9
commit e60f361c9a
2 changed files with 0 additions and 69 deletions

View file

@ -43,8 +43,6 @@ public abstract class ZLDialogManager {
return ourInstance;
}
public abstract ZLApplicationWindow createApplicationWindow(ZLApplication application);
public abstract ZLOptionsDialog createOptionsDialog(String key, Runnable exitAction, Runnable applyAction, boolean showApplyButton);
public abstract void wait(String key, Runnable runnable);
@ -59,14 +57,6 @@ public abstract class ZLDialogManager {
return getResource().getResource("waitMessage").getResource(key).getValue();
}
public static String getDialogMessage(String key) {
return getResource().getResource(key).getResource("message").getValue();
}
public static String getDialogTitle(String key) {
return getResource().getResource(key).getResource("title").getValue();
}
protected static ZLResource getResource() {
return ZLResource.resource("dialog");
}

View file

@ -62,65 +62,6 @@ public class ZLAndroidDialogManager extends ZLDialogManager {
runActivity(activityClass, Collections.<String,String>emptyMap());
}
private class MyAlertDialog extends AlertDialog {
MyAlertDialog(Context context, boolean cancelable, OnCancelListener listener) {
super(context, cancelable, listener);
}
}
private void showAlert(int iconId, String key, String message) {
final AlertDialog dialog = new MyAlertDialog(myActivity, true, null);
dialog.setTitle(getDialogTitle(key));
dialog.setMessage(message);
dialog.setIcon(iconId);
dialog.setButton(getButtonText(OK_BUTTON).replaceAll("&", ""), (AlertListener)null);
dialog.show();
//AlertDialog.show(myActivity, null, iconId, message, getButtonText(OK_BUTTON).replaceAll("&", ""), null, true, null);
}
private static class AlertListener implements DialogInterface.OnClickListener {
private final Runnable myAction0, myAction1, myAction2;
public AlertListener(Runnable action0, Runnable action1, Runnable action2) {
myAction0 = action0;
myAction1 = action1;
myAction2 = action2;
}
public void onClick(DialogInterface dialog, int which) {
Runnable action = null;
switch (which) {
case DialogInterface.BUTTON1:
action = myAction0;
break;
case DialogInterface.BUTTON2:
action = myAction1;
break;
case DialogInterface.BUTTON3:
action = myAction2;
break;
}
if (action != null) {
new Handler().post(action);
}
dialog.dismiss();
}
}
public ZLAndroidApplicationWindow createApplicationWindow(ZLApplication application) {
// TODO: implement
//myApplicationWindow = new ZLAndroidApplicationWindow(activity);
//return myApplicationWindow;
return null;
}
/*
static JButton createButton(String key) {
String text = getButtonText(key).replace("&", "");
return new JButton(text);
}
*/
public ZLOptionsDialog createOptionsDialog(String key, Runnable exitAction, Runnable applyAction, boolean showApplyButton) {
return new ZLAndroidOptionsDialog(myActivity, getResource().getResource(key), exitAction, applyAction);
}