package com.pop;
import android.app.Activity;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.TextView;
import android.widget.Toast;
public class PopWin {
public View view;
Activity mpthis;
PopupWindow mPopupWindow;
int mheight;
public PopWin(Activity pthis) {
mpthis = pthis;
mPopupWindow = null;
}
public void setY(int y) {
mheight = y;
Log.d("PopWin", "setY:" + mheight);
}
public void dismiss() {
Log.d("PopWin", "dismiss");
if (mPopupWindow != null) {
mPopupWindow.dismiss();
mPopupWindow = null;
Log.d("PopWin", "dismiss ok");
}
}
TextView tv_showText = null;
ImageView in1 = null;
ImageView in2 = null;
TextView tv = null;
TextView tv1 = null;
public void ShowWin(OnClickListener oc) {
dismiss();
View foot_popunwindwow = null;
LayoutInflater LayoutInflater = (LayoutInflater) mpthis
.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
foot_popunwindwow = LayoutInflater
.inflate(R.layout.foot_map_view, null);
mPopupWindow = new PopupWindow(foot_popunwindwow,
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
Log.d("PopWin", "" + mheight);
mPopupWindow.showAtLocation(mpthis.findViewById(R.id.layout),
Gravity.LEFT | Gravity.TOP, 100, 200);
mPopupWindow.update();
in1 = (ImageView) foot_popunwindwow.findViewById(R.id.in1);
in2 = (ImageView) foot_popunwindwow.findViewById(R.id.in2);
tv = (TextView) foot_popunwindwow.findViewById(R.id.text1);
tv.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(mpthis, "text1", Toast.LENGTH_SHORT).show();
}
});
in1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(mpthis, "in1", Toast.LENGTH_SHORT).show();
}
});
in2.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(mpthis, "in2", Toast.LENGTH_SHORT).show();
}
});
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Android应用源码之PopWindow-IT计算机-毕业设计.zip (46个子文件)
Android应用源码之PopWindow
PopWindow
bin
classes.dex 6KB
PopWindow.apk 179KB
com
pop
R$layout.class 398B
R$id.class 487B
R$drawable.class 970B
R$attr.class 307B
PopWin$3.class 907B
R.class 454B
PopWin.class 3KB
PopWin$1.class 909B
R$string.class 394B
PopWin$2.class 907B
PopupWindows.class 1KB
resources.ap_ 174KB
res
drawable-ldpi
icon.png 2KB
drawable-hdpi
btn_prev_down_normal.png 1KB
a.png 19KB
h.png 19KB
divider2.png 360B
c.png 19KB
toolbar_nearsearch_normal.png 2KB
f.png 19KB
e.png 19KB
i.png 19KB
direct_mapsearch_nav.png 1KB
direct_mapsearch_nearsearch.png 1KB
b.png 19KB
d.png 19KB
icon.png 4KB
bg.9.png 1KB
bg1.9.png 1KB
g.png 19KB
menu_route.png 4KB
poi_1.png 1KB
btn_next_up_normal.png 1KB
values
strings.xml 171B
drawable-mdpi
icon.png 3KB
layout
main.xml 480B
foot_map_view.xml 1KB
default.properties 364B
gen
com
pop
R.java 2KB
src
com
pop
PopWin.java 2KB
PopupWindows.java 752B
.project 845B
.classpath 280B
AndroidManifest.xml 700B
共 46 条
- 1
资源评论
芝麻粒儿
- 粉丝: 5w+
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功