1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

code simplification

This commit is contained in:
Nikolay Pultsin 2013-12-08 10:50:51 +00:00
parent 363c951095
commit defeff9f78
3 changed files with 2 additions and 16 deletions

View file

@ -277,10 +277,6 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }
public ZLAndroidWidget getMainView() {
return myMainView;
}
@Override @Override
protected void onNewIntent(final Intent intent) { protected void onNewIntent(final Intent intent) {
final String action = intent.getAction(); final String action = intent.getAction();
@ -776,7 +772,7 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
@Override @Override
public ZLViewWidget getViewWidget() { public ZLViewWidget getViewWidget() {
return ((ZLAndroidLibrary)ZLAndroidLibrary.Instance()).getWidget(); return myMainView;
} }
private final HashMap<MenuItem,String> myMenuItemMap = new HashMap<MenuItem,String>(); private final HashMap<MenuItem,String> myMenuItemMap = new HashMap<MenuItem,String>();

View file

@ -56,7 +56,6 @@ import org.geometerplus.android.util.UIUtil;
public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.ChangeListener { public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.ChangeListener {
private NetworkBookTree myTree; private NetworkBookTree myTree;
private NetworkBookItem myBook; private NetworkBookItem myBook;
private View myMainView;
private final ZLResource myResource = ZLResource.resource("bookInfo"); private final ZLResource myResource = ZLResource.resource("bookInfo");
private final BookDownloaderServiceConnection myConnection = new BookDownloaderServiceConnection(); private final BookDownloaderServiceConnection myConnection = new BookDownloaderServiceConnection();
@ -68,8 +67,7 @@ public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.
SQLiteCookieDatabase.init(this); SQLiteCookieDatabase.init(this);
myMainView = getLayoutInflater().inflate(R.layout.network_book, null, false); setContentView(R.layout.network_book);
setContentView(myMainView);
} }
@Override @Override
@ -157,10 +155,6 @@ public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.
} }
}; };
View getMainView() {
return myMainView;
}
private void setTextById(int id, CharSequence text) { private void setTextById(int id, CharSequence text) {
((TextView)findViewById(id)).setText(text); ((TextView)findViewById(id)).setText(text);
} }

View file

@ -91,10 +91,6 @@ public final class ZLAndroidLibrary extends ZLibrary {
} }
} }
public ZLAndroidWidget getWidget() {
return myActivity.getMainView();
}
public AssetManager getAssets() { public AssetManager getAssets() {
return myApplication.getAssets(); return myApplication.getAssets();
} }