private void setIntentByViewGroup(RemoteViews remoteViews, ViewGroup viewGroup, List<RectInfo> list) {
int count = viewGroup.getChildCount();
Rect p = new Rect();
viewGroup.getHitRect(p);
for (int i = 0; i < count; i++) {
View v = viewGroup.getChildAt(i);
if (v instanceof ViewGroup) {
// linearlayout
setIntentByViewGroup(remoteViews, (ViewGroup) v, list);
} else if (v instanceof TextView || v instanceof ImageView) {
// textview
Rect rect = getRect(v);
RectInfo next = findIntent(rect, list);
if (next != null) {
// VLog.d(TAG, next.rect+":setPendIntent:"+i);
// remoteViews.setImageViewBitmap(v.getId(), next.testBg);
remoteViews.setOnClickPendingIntent(v.getId(), next.mPendingIntent);
}
}
}
}
PendIntentCompat.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:VirtualHook
作者:
评论列表
文章目录