mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
code simplification
This commit is contained in:
parent
363c951095
commit
defeff9f78
3 changed files with 2 additions and 16 deletions
|
@ -277,10 +277,6 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
|
|||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
public ZLAndroidWidget getMainView() {
|
||||
return myMainView;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(final Intent intent) {
|
||||
final String action = intent.getAction();
|
||||
|
@ -776,7 +772,7 @@ public final class FBReader extends Activity implements ZLApplicationWindow {
|
|||
|
||||
@Override
|
||||
public ZLViewWidget getViewWidget() {
|
||||
return ((ZLAndroidLibrary)ZLAndroidLibrary.Instance()).getWidget();
|
||||
return myMainView;
|
||||
}
|
||||
|
||||
private final HashMap<MenuItem,String> myMenuItemMap = new HashMap<MenuItem,String>();
|
||||
|
|
|
@ -56,7 +56,6 @@ import org.geometerplus.android.util.UIUtil;
|
|||
public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.ChangeListener {
|
||||
private NetworkBookTree myTree;
|
||||
private NetworkBookItem myBook;
|
||||
private View myMainView;
|
||||
|
||||
private final ZLResource myResource = ZLResource.resource("bookInfo");
|
||||
private final BookDownloaderServiceConnection myConnection = new BookDownloaderServiceConnection();
|
||||
|
@ -68,8 +67,7 @@ public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.
|
|||
|
||||
SQLiteCookieDatabase.init(this);
|
||||
|
||||
myMainView = getLayoutInflater().inflate(R.layout.network_book, null, false);
|
||||
setContentView(myMainView);
|
||||
setContentView(R.layout.network_book);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -157,10 +155,6 @@ public class NetworkBookInfoActivity extends Activity implements NetworkLibrary.
|
|||
}
|
||||
};
|
||||
|
||||
View getMainView() {
|
||||
return myMainView;
|
||||
}
|
||||
|
||||
private void setTextById(int id, CharSequence text) {
|
||||
((TextView)findViewById(id)).setText(text);
|
||||
}
|
||||
|
|
|
@ -91,10 +91,6 @@ public final class ZLAndroidLibrary extends ZLibrary {
|
|||
}
|
||||
}
|
||||
|
||||
public ZLAndroidWidget getWidget() {
|
||||
return myActivity.getMainView();
|
||||
}
|
||||
|
||||
public AssetManager getAssets() {
|
||||
return myApplication.getAssets();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue