mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
renaming
This commit is contained in:
parent
0f844d797e
commit
46ca7e191e
5 changed files with 14 additions and 22 deletions
|
@ -53,7 +53,7 @@
|
|||
</intent-filter>
|
||||
<meta-data android:name="android.app.default_searchable" android:value="org.geometerplus.android.fbreader.TextSearchActivity" />
|
||||
</activity>
|
||||
<activity android:name="org.geometerplus.android.fbreader.BookStatusActivity" android:configChanges="orientation|keyboardHidden" android:process=":library"/>
|
||||
<activity android:name="org.geometerplus.android.fbreader.BookInfoActivity" android:configChanges="orientation|keyboardHidden" android:process=":library"/>
|
||||
<activity android:name="org.geometerplus.android.fbreader.TextSearchActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
|
@ -89,7 +89,7 @@
|
|||
</activity>
|
||||
<activity android:name="org.geometerplus.android.fbreader.BookmarkEditActivity" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.preferences.PreferenceActivity" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.preferences.BookInfoActivity" android:process=":library" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.preferences.EditBookInfoActivity" android:process=":library" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.network.BookDownloader" android:process=":bookDownloader" android:theme="@android:style/Theme.NoDisplay">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</intent-filter>
|
||||
<meta-data android:name="android.app.default_searchable" android:value="org.geometerplus.android.fbreader.TextSearchActivity" />
|
||||
</activity>
|
||||
<activity android:name="org.geometerplus.android.fbreader.BookStatusActivity" android:configChanges="orientation|keyboardHidden" android:process=":library"/>
|
||||
<activity android:name="org.geometerplus.android.fbreader.BookInfoActivity" android:configChanges="orientation|keyboardHidden" android:process=":library"/>
|
||||
<activity android:name="org.geometerplus.android.fbreader.TextSearchActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
|
@ -89,7 +89,7 @@
|
|||
</activity>
|
||||
<activity android:name="org.geometerplus.android.fbreader.BookmarkEditActivity" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.preferences.PreferenceActivity" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.preferences.BookInfoActivity" android:process=":library" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.preferences.EditBookInfoActivity" android:process=":library" android:configChanges="orientation|keyboardHidden" />
|
||||
<activity android:name="org.geometerplus.android.fbreader.network.BookDownloader" android:process=":bookDownloader" android:theme="@android:style/Theme.NoDisplay">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
|
|
@ -50,9 +50,9 @@ import org.geometerplus.fbreader.formats.FormatPlugin;
|
|||
import org.geometerplus.fbreader.formats.PluginCollection;
|
||||
import org.geometerplus.fbreader.library.*;
|
||||
|
||||
import org.geometerplus.android.fbreader.preferences.BookInfoActivity;
|
||||
import org.geometerplus.android.fbreader.preferences.EditBookInfoActivity;
|
||||
|
||||
public class BookStatusActivity extends Activity {
|
||||
public class BookInfoActivity extends Activity {
|
||||
public static final String CURRENT_BOOK_PATH_KEY = "CurrentBookPath";
|
||||
|
||||
private final ZLResource myResource = ZLResource.resource("bookInfo");
|
||||
|
@ -131,8 +131,8 @@ public class BookStatusActivity extends Activity {
|
|||
}
|
||||
|
||||
private void startEditDialog() {
|
||||
final Intent intent = new Intent(getApplicationContext(), BookInfoActivity.class);
|
||||
intent.putExtra(BookInfoActivity.CURRENT_BOOK_PATH_KEY, myBook.File.getPath());
|
||||
final Intent intent = new Intent(getApplicationContext(), EditBookInfoActivity.class);
|
||||
intent.putExtra(CURRENT_BOOK_PATH_KEY, myBook.File.getPath());
|
||||
startActivity(intent);
|
||||
}
|
||||
|
|
@ -39,9 +39,9 @@ class ShowBookInfoAction extends FBAction {
|
|||
|
||||
public void run() {
|
||||
myBaseActivity.startActivityForResult(
|
||||
new Intent(myBaseActivity.getApplicationContext(), BookStatusActivity.class)
|
||||
new Intent(myBaseActivity.getApplicationContext(), BookInfoActivity.class)
|
||||
.putExtra(
|
||||
BookStatusActivity.CURRENT_BOOK_PATH_KEY,
|
||||
BookInfoActivity.CURRENT_BOOK_PATH_KEY,
|
||||
Reader.Model.Book.File.getPath()
|
||||
),
|
||||
FBReader.REPAINT_CODE
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.geometerplus.zlibrary.text.hyphenation.ZLTextHyphenator;
|
|||
|
||||
import org.geometerplus.fbreader.library.Book;
|
||||
|
||||
import org.geometerplus.android.fbreader.BookInfoActivity;
|
||||
import org.geometerplus.android.fbreader.SQLiteBooksDatabase;
|
||||
|
||||
class BookTitlePreference extends ZLStringPreference {
|
||||
|
@ -83,12 +84,10 @@ class LanguagePreference extends ZLStringListPreference {
|
|||
}
|
||||
}
|
||||
|
||||
public class BookInfoActivity extends ZLPreferenceActivity {
|
||||
public static final String CURRENT_BOOK_PATH_KEY = "CurrentBookPath";
|
||||
|
||||
public class EditBookInfoActivity extends ZLPreferenceActivity {
|
||||
private Book myBook;
|
||||
|
||||
public BookInfoActivity() {
|
||||
public EditBookInfoActivity() {
|
||||
super("BookInfo");
|
||||
}
|
||||
|
||||
|
@ -98,17 +97,10 @@ public class BookInfoActivity extends ZLPreferenceActivity {
|
|||
new SQLiteBooksDatabase(this, "LIBRARY");
|
||||
}
|
||||
|
||||
final String path = intent.getStringExtra(CURRENT_BOOK_PATH_KEY);
|
||||
final String path = intent.getStringExtra(BookInfoActivity.CURRENT_BOOK_PATH_KEY);
|
||||
final ZLFile file = ZLFile.createFileByPath(path);
|
||||
myBook = Book.getByFile(file);
|
||||
|
||||
if (myBook.File.getPhysicalFile() != null) {
|
||||
addPreference(new InfoPreference(
|
||||
this,
|
||||
Resource.getResource("fileName").getValue(),
|
||||
myBook.File.getPath())
|
||||
);
|
||||
}
|
||||
addPreference(new BookTitlePreference(this, Resource, "title", myBook));
|
||||
addPreference(new LanguagePreference(this, Resource, "language", myBook));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue