mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
CancelActivity (in progress)
This commit is contained in:
parent
bf4a642f14
commit
d6e7d9e3a0
4 changed files with 33 additions and 2 deletions
|
@ -55,6 +55,7 @@
|
||||||
</intent-filter>
|
</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.CancelActivity" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden"/>
|
||||||
<activity android:name="org.geometerplus.android.fbreader.image.ImageViewActivity" android:process=":imageView" android:configChanges="orientation|keyboardHidden"/>
|
<activity android:name="org.geometerplus.android.fbreader.image.ImageViewActivity" android:process=":imageView" android:configChanges="orientation|keyboardHidden"/>
|
||||||
<activity android:name="org.geometerplus.android.fbreader.BookInfoActivity" android:configChanges="orientation|keyboardHidden" android:process=":library"/>
|
<activity android:name="org.geometerplus.android.fbreader.BookInfoActivity" android:configChanges="orientation|keyboardHidden" android:process=":library"/>
|
||||||
<service android:name="org.geometerplus.android.fbreader.library.InitializationService" android:process=":library" />
|
<service android:name="org.geometerplus.android.fbreader.library.InitializationService" android:process=":library" />
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
package org.geometerplus.android.fbreader;
|
package org.geometerplus.android.fbreader;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.fbreader.FBAction;
|
import org.geometerplus.fbreader.fbreader.FBAction;
|
||||||
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
||||||
|
|
||||||
|
@ -34,7 +36,10 @@ class CancelAction extends FBAction {
|
||||||
if (Reader.getCurrentView() != Reader.BookTextView) {
|
if (Reader.getCurrentView() != Reader.BookTextView) {
|
||||||
Reader.showBookTextView();
|
Reader.showBookTextView();
|
||||||
} else {
|
} else {
|
||||||
Reader.closeWindow();
|
final Intent intent = new Intent();
|
||||||
|
intent.setClass(myBaseActivity, CancelActivity.class);
|
||||||
|
myBaseActivity.startActivity(intent);
|
||||||
|
//Reader.closeWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
25
src/org/geometerplus/android/fbreader/CancelActivity.java
Normal file
25
src/org/geometerplus/android/fbreader/CancelActivity.java
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2010-2011 Geometer Plus <contact@geometerplus.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.geometerplus.android.fbreader;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
|
||||||
|
public class CancelActivity extends Activity {
|
||||||
|
}
|
|
@ -66,7 +66,7 @@ class ProcessHyperlinkAction extends FBAction {
|
||||||
final String uriString = ((ZLTextImageRegion)region).ImageElement.URI;
|
final String uriString = ((ZLTextImageRegion)region).ImageElement.URI;
|
||||||
if (uriString != null) {
|
if (uriString != null) {
|
||||||
try {
|
try {
|
||||||
final Intent intent = new Intent(Intent.ACTION_VIEW);
|
final Intent intent = new Intent();
|
||||||
intent.setClass(myBaseActivity, ImageViewActivity.class);
|
intent.setClass(myBaseActivity, ImageViewActivity.class);
|
||||||
intent.setData(Uri.parse(uriString));
|
intent.setData(Uri.parse(uriString));
|
||||||
myBaseActivity.startActivity(intent);
|
myBaseActivity.startActivity(intent);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue