C Activity实在声明文件中声明为android:theme="@style/FunctionDialog" ,不知道设置什么属性可以让C Activity不居中而局右
解决方案 »
- 关于android源码程序图标问题
- 请教android培训学校
- Unable to instantiate activity ComponentInfo
- 闹钟设定问题,求解,谢谢大家。
- Cheapest Dofus Kamas Online
- 客户端如何能接收服务端非阻塞的socket发的消息
- android是实时工控领域的应用视频
- 本人新手,关于android advice chooser target unkno急急急~
- android编译错误sepolicy
- 执行AlertDialog.Builder.show()时,不等待用户点击“确定”吗?
- 怎么获取到通过intent跳转到本页面的上一个Activity
- proguard混淆
Window window = dialog == null ? null : dialog.getWindow();
if (dialog != null && window != null) {
LayoutParams attr = window.getAttributes();
if (attr != null) {
attr.height = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
attr.gravity = Gravity.RIGHT;
}
}
@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启动的,没办法用你那个方法啊?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().getAttributes().width = LayoutParams.WRAP_CONTENT;
getWindow().getAttributes().gravity = Gravity.RIGHT;
}