1
2
3
4
5
6
7
8
9
10
11
|
fanhui.setOnClickListener(
new
OnClickListener() {
@Override
public
void
onClick(View arg0) {
// TODO Auto-generated method stub
Intent function =
new
Intent();
function.setClass(UserJiuGongGeActivity.
this
, FunctionActivity.
class
);
startActivity(function);
}
});
|
dialog是Activity,是由intent启动的,则用如下方法
2
3
4
5
6
|
@Override
protected
void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
getWindow().getAttributes().width = LayoutParams.WRAP_CONTENT;
getWindow().getAttributes().gravity = Gravity.RIGHT;
}
|