Comments (20)
解决了
from novelreader.
求指导啊!!咋实现的
from novelreader.
你是打算拿来搞广告吧?
from novelreader.
显示内容位置不够,如何加一页添加自定义view?
from novelreader.
解决了
你好,怎么实现的这个然后可以交互啊,求助
from novelreader.
解决了
这个是怎么解决的,谢谢
from novelreader.
from novelreader.
@wuzeqiu 你是通过Canvas 画了一个空白地方,然后再放个布局在上面的吧
from novelreader.
from novelreader.
from novelreader.
@wuzeqiu 你这边是怎么设置的,我设置最后一个空白页,但是好像把下一章节的内容第一页的内容给占用了
from novelreader.
from novelreader.
// TODO: 2018/6/13 绘制插图
Log.v("TAG", "======1 == mCurPage.isAD=======" + mCurPage.isAD);
if (1 == STATUS_CATEGORY_AD) {
Paint.FontMetrics fontMetrics = mTextPaint.getFontMetrics();
float textHeight = fontMetrics.top - fontMetrics.bottom;
float textWidth = mTextPaint.measureText("我要留给一个空白页在这里,你大爷");
float pivotX = (mDisplayWidth - textWidth) / 2;
float pivotY = (mDisplayHeight - textHeight) / 2;
canvas.drawText("", 0, 0, mTextPaint);
STATUS_CATEGORY_AD = 0;
} else {
//对标题进行绘制
for (int i = 0; i < mCurPage.titleLines; ++i) {
str = mCurPage.lines.get(i);
//设置顶部间距
if (i == 0) {
top += mTitlePara;
}
//计算文字显示的起始点
int start = (int) (mDisplayWidth - mTitlePaint.measureText(str)) / 2;
//进行绘制
canvas.drawText(str, start, top, mTitlePaint);
//设置尾部间距
if (i == mCurPage.titleLines - 1) {
top += titlePara;
} else {
//行间距
top += titleInterval;
}
}
//对内容进行绘制
for (int i = mCurPage.titleLines; i < mCurPage.lines.size(); ++i) {
str = mCurPage.lines.get(i);
canvas.drawText(str, mMarginWidth, top, mTextPaint);
if (str.endsWith("\n")) {
top += para;
} else {
top += interval;
}
}
Log.v("TAG", "mCurPage.position" + mCurPage.position);
if (mCurPage.position + 1 == mCurPageList.size() || (mCurPage.position + 1) == 1) {
Log.v("TAG", "======绘制插图=======");
STATUS_CATEGORY_AD = 1;
}
from novelreader.
from novelreader.
@wuzeqiu 你邮箱多少,私聊?
from novelreader.
https://github.com/itwangyu/NovelReaderAdDemo
这个可以增加自定义布局,但是上下滑动无法点击,大家一起讨论一下能不能解决!
from novelreader.
@KotlinLan 我也遇到了相同的问题 问题解决了吗
from novelreader.
from novelreader.
@Airmour 没有。
from novelreader.
https://github.com/itwangyu/NovelReaderAdDemo 这个可以增加自定义布局,但是上下滑动无法点击,大家一起讨论一下能不能解决!
上下滑动可以设置vip,vip免广告 绝了!
from novelreader.
Related Issues (20)
- 免费开源的小说阅读项目https://github.com/390057892/reader
- 免费开源的小说阅读项目https://github.com/390057892/reader
- 免费开源的小说阅读项目https://github.com/390057892/reader
- 免费开源的小说阅读项目https://github.com/390057892/reader
- 免费开源的小说阅读项目https://github.com/390057892/reader
- Android Studio Arctic Fox
- 阅读器中间想插入广告 HOT 3
- 缺少包(model>bean>gen) HOT 1
- 上下滑动阅读模式卡顿
- 建个交流群,方便大家互相交流、分享解决问题
- Releases 中是空的, 怎么下载 此APP的 APK 文件呢 HOT 1
- 免费开源的小说阅读项目 https://github.com/yuenov/reader-api
- 仿真翻页取消有问题 HOT 1
- 一章节的内容多了 ,直接卡死
- 你好作者,如果小说内容由纯文本构成,按照这个排版,单词就会被切割掉了
- 同问,英文的文章,如何可以排版正确呢? HOT 3
- 项目缺少文件夹com.example.newbiechen.ireader.model.gen及里面的文件 HOT 1
- 上下翻页章节最后一页页码不对 HOT 1
- 阅读页文字左右不对齐
- 编译一直出现问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from novelreader.