20
this
.dates = dates;
21
showDialog();
22
}
23
24
public
void
showDialog()
25
{
26
showDialog(0, 0);
27
}
28
29
public
void
showDialog(
int
x,
int
y)
30
{
31
RelativeLayout rl =
new
RelativeLayout(context);
32
list =
new
ListView(context);
33
34
list.setVerticalScrollBarEnabled(
false
);
35
RelativeLayout.LayoutParams lp =
new
RelativeLayout.LayoutParams(120,
36
LayoutParams.MATCH_PARENT);
37
lp.addRule(RelativeLayout.ALIGN_TOP);
38
lp.addRule(RelativeLayout.ALIGN_RIGHT);
39
rl.addView(list, lp);
40
41
setContentView(rl);
42
list.setAdapter(
new
MyBaseAdapter(context, dates));
43
//
界面设置
44
windowDeploy(x, y);
45
}
46
47
/**
48
* 设置监听
49
*
50
*
@param
itemListener
51
*/
52
public
void
setOnListItemClickListener(OnItemClickListener itemListener)
53
{
54
list.setOnItemClickListener(itemListener);
55
}
56