1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 10:19:33 +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> <intent-filter>
<action android:name="android.intent.action.SEARCH" /> <action android:name="android.intent.action.SEARCH" />
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="fbreader.library.intent.FOUND" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
</activity> </activity>
<activity android:name="org.geometerplus.android.fbreader.library.LibraryTreeActivity" android:process=":library" android:configChanges="orientation|keyboardHidden"> <activity android:name="org.geometerplus.android.fbreader.library.LibraryTreeActivity" android:process=":library" android:configChanges="orientation|keyboardHidden">

View file

@ -70,6 +70,9 @@
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEARCH" /> <action android:name="android.intent.action.SEARCH" />
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="fbreader.library.intent.FOUND" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
</activity> </activity>
<activity android:name="org.geometerplus.android.fbreader.library.LibraryTreeActivity" android:process=":library" android:configChanges="orientation|keyboardHidden"> <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 Covers loading in background
DONE Wait messages DONE Wait messages
* Favorites * Favorites
* Search DONE Search
* File view * File view
* Activity caption * Activity caption
* Book deleting * Book deleting

View file

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