Comments (4)
info_known.xml 文件中
ImageView
android:id="@+id/iv_known"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/id_iv_tip"
android:src="@drawable/jt_known"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:paddingRight="10dp"
android:onClick="clickKnown"
android:onClick不能用在Fragment的xml中。。。
如何破。。。
from highlight.
mHightLight.getHightLightView().findViewById(R.id.iv_known).setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
clickKnown();
}
});
这样写可以,你运行试试吧还会出其他问题,开始是空指针,你会解决的;弄好以后fragment来回切换还会出问题这个我也解决不了了
from highlight.
只能是在ativity里使用了。
在activity里拿到fragment的view就行了
有这个方法:
addHighLight(View view, int decorLayoutId, OnPosCallback onPosCallback, LightShape lightShape)
from highlight.
注入的点击事件clickKnown写到activity可行。
from highlight.
Related Issues (20)
- setOnLayoutCallback 会执行两次 HOT 3
- 我觉得actionbar/toolbar不要被遮罩进去比较好看 HOT 1
- android:allowBackup="true"的问题
- setOnLayoutCallback执行了两次怎么解决
- 用在Activity里还行,在Fragment里用问题很多 HOT 1
- 在fragment 中使用 显示正常, 但是切换页面的时候出现这个android.view.View.unFocus HOT 5
- 在vivo Xplay3S 出现ClassCastException HOT 1
- 是我使用方法有问题吗?当我快速点击时 报错 HOT 1
- 设置高亮区颜色
- 怎样让RecyclerView的某个item的子view高亮显示 HOT 2
- Gradle build的时候报错了 1.8.0
- 可以出一下在Fragment里使用的demo 吗
- 新加的提示图,起点为什么和高亮点一样。
- Scrollow滑动底部控件后调用Highlight的updateInfo高亮没有刷新
- fitsSystemWindows后导致高亮位置不对 HOT 1
- clone后无法编译哇 HOT 1
- 横屏下 蒙版消失前会先向左右两侧收缩后消失
- Failed to resolve
- So-called DaVinci 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 highlight.