mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
sync with intro branch
This commit is contained in:
parent
9e002e2576
commit
825fdd6e22
2 changed files with 24 additions and 1 deletions
|
@ -19,11 +19,16 @@
|
||||||
|
|
||||||
package org.geometerplus.android.fbreader;
|
package org.geometerplus.android.fbreader;
|
||||||
|
|
||||||
|
import android.util.TypedValue;
|
||||||
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.PopupWindow;
|
import android.widget.PopupWindow;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
|
|
||||||
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
import org.geometerplus.zlibrary.text.view.*;
|
import org.geometerplus.zlibrary.text.view.*;
|
||||||
|
import org.geometerplus.zlibrary.ui.android.R;
|
||||||
|
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
import org.geometerplus.fbreader.fbreader.FBReaderApp;
|
||||||
|
|
||||||
|
@ -59,7 +64,15 @@ class DisplayBookPopupAction extends FBAndroidAction {
|
||||||
popup.setFocusable(true);
|
popup.setFocusable(true);
|
||||||
popup.setOutsideTouchable(true);
|
popup.setOutsideTouchable(true);
|
||||||
|
|
||||||
final ZLResource buttonResource = ZLResource.resource("dialog").getResource("button")
|
final ImageView coverView = (ImageView)bookView.findViewById(R.id.book_popup_cover);
|
||||||
|
if (coverView != null) {
|
||||||
|
final ZLAndroidImageData imageData = (ZLAndroidImageData)element.getImageData();
|
||||||
|
if (imageData != null) {
|
||||||
|
coverView.setImageBitmap(imageData.getFullSizeBitmap());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final ZLResource buttonResource = ZLResource.resource("dialog").getResource("button");
|
||||||
final View buttonsView = bookView.findViewById(R.id.book_popup_buttons);
|
final View buttonsView = bookView.findViewById(R.id.book_popup_buttons);
|
||||||
|
|
||||||
final Button downloadButton = (Button)buttonsView.findViewById(R.id.ok_button);
|
final Button downloadButton = (Button)buttonsView.findViewById(R.id.ok_button);
|
||||||
|
|
|
@ -946,6 +946,16 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
||||||
final int hMargin = ZLibrary.Instance().getDisplayDPI() / 10;
|
final int hMargin = ZLibrary.Instance().getDisplayDPI() / 10;
|
||||||
final ZLImageData imageData = ((BookElement)element).getImageData();
|
final ZLImageData imageData = ((BookElement)element).getImageData();
|
||||||
if (imageData != null) {
|
if (imageData != null) {
|
||||||
|
context.drawImage(
|
||||||
|
area.XStart + hMargin, area.YEnd - vMargin,
|
||||||
|
imageData,
|
||||||
|
new ZLPaintContext.Size(
|
||||||
|
area.XEnd - area.XStart - 2 * hMargin + 1,
|
||||||
|
area.YEnd - area.YStart - 2 * vMargin + 1
|
||||||
|
),
|
||||||
|
ZLPaintContext.ScalingType.FitMaximum,
|
||||||
|
ZLPaintContext.ColorAdjustingMode.NONE
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
} else if (element == ZLTextElement.HSpace) {
|
} else if (element == ZLTextElement.HSpace) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue