1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

library search (finished)

This commit is contained in:
Nikolay Pultsin 2010-12-05 03:00:13 +00:00
parent 904f72a0c8
commit c3befbd767
4 changed files with 17 additions and 3 deletions

View file

@ -70,6 +70,9 @@
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<intent-filter>
<action android:name="fbreader.library.intent.FOUND" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
</activity>
<activity android:name="org.geometerplus.android.fbreader.library.LibraryTreeActivity" android:process=":library" android:configChanges="orientation|keyboardHidden">

View file

@ -70,6 +70,9 @@
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<intent-filter>
<action android:name="fbreader.library.intent.FOUND" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
</activity>
<activity android:name="org.geometerplus.android.fbreader.library.LibraryTreeActivity" android:process=":library" android:configChanges="orientation|keyboardHidden">

View file

@ -4,7 +4,7 @@
DONE Covers loading in background
DONE Wait messages
* Favorites
* Search
DONE Search
* File view
* Activity caption
* Book deleting

View file

@ -48,8 +48,16 @@ public class LibraryTreeActivity extends LibraryBaseActivity {
final Intent intent = getIntent();
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
// TODO: implement
finish();
if (runSearch(intent)) {
startActivity(intent
.setAction(ACTION_FOUND)
.setClass(getApplicationContext(), LibraryTopLevelActivity.class)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK)
);
} else {
showNotFoundToast();
finish();
}
} else {
myTreePathString = getIntent().getStringExtra(TREE_PATH_KEY);
mySelectedBookPath = getIntent().getStringExtra(SELECTED_BOOK_PATH_KEY);