mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
code simplification
This commit is contained in:
parent
a377ec8bf7
commit
7b32f9e8bd
2 changed files with 3 additions and 19 deletions
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
>
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/selectedList"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
|
@ -21,7 +21,7 @@ package org.geometerplus.android.fbreader.network;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.ListActivity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -32,7 +32,7 @@ import org.geometerplus.zlibrary.ui.android.R;
|
||||||
import org.geometerplus.fbreader.network.*;
|
import org.geometerplus.fbreader.network.*;
|
||||||
import org.geometerplus.android.fbreader.covers.CoverManager;
|
import org.geometerplus.android.fbreader.covers.CoverManager;
|
||||||
|
|
||||||
public class AllCatalogsActivity extends Activity {
|
public class AllCatalogsActivity extends ListActivity {
|
||||||
final NetworkLibrary myLibrary = NetworkLibrary.Instance();
|
final NetworkLibrary myLibrary = NetworkLibrary.Instance();
|
||||||
private ArrayList<Item> myAllItems = new ArrayList<Item>();
|
private ArrayList<Item> myAllItems = new ArrayList<Item>();
|
||||||
ArrayList<String> myIds = new ArrayList<String>();
|
ArrayList<String> myIds = new ArrayList<String>();
|
||||||
|
@ -47,8 +47,6 @@ public class AllCatalogsActivity extends Activity {
|
||||||
protected void onCreate(Bundle icicle) {
|
protected void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
|
|
||||||
setContentView(R.layout.network_library_filter);
|
|
||||||
|
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
myIds = intent.getStringArrayListExtra(IDS_LIST);
|
myIds = intent.getStringArrayListExtra(IDS_LIST);
|
||||||
myInactiveIds = intent.getStringArrayListExtra(INACTIVE_IDS_LIST);
|
myInactiveIds = intent.getStringArrayListExtra(INACTIVE_IDS_LIST);
|
||||||
|
@ -78,8 +76,7 @@ public class AllCatalogsActivity extends Activity {
|
||||||
myAllItems.addAll(cItems);
|
myAllItems.addAll(cItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
final ListView selectedList = (ListView)findViewById(R.id.selectedList);
|
setListAdapter(new CatalogsListAdapter());
|
||||||
selectedList.setAdapter(new CatalogsListAdapter());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue