mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
library search (finished)
This commit is contained in:
parent
904f72a0c8
commit
c3befbd767
4 changed files with 17 additions and 3 deletions
|
@ -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">
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)) {
|
||||||
|
startActivity(intent
|
||||||
|
.setAction(ACTION_FOUND)
|
||||||
|
.setClass(getApplicationContext(), LibraryTopLevelActivity.class)
|
||||||
|
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
showNotFoundToast();
|
||||||
finish();
|
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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue