您好,我有一个简单的问题,我有一个alertDialog,我希望它显示我在这里搜索过的两个按钮,但似乎之前的选项不再工作,已被弃用.
任何人都知道这样做的新方法你可以看到下面的代码不起作用.
Button share = (Button) findViewById(R.id.btn_share);
share.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// call some other methods before that I guess...
AlertDialog alertDialog = new AlertDialog.Builder(PasswActivity.this).create(); //Read Update
alertDialog.setTitle("Uprgade");
alertDialog.setMessage("Upgrade Text Here");
alertDialog.setButton("Upgrade", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
});
alertDialog.setButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
});
alertDialog.show(); //<-- See This!
}
});
Run Code Online (Sandbox Code Playgroud) 我希望表格能够在较小的屏幕(例如 17 英寸或更小)上填充 100% 的空间,但在 19 英寸上仅填充约 90%,在 22 英寸上填充 80%,在 24 英寸或更大屏幕上填充约 60% 。这些不必是精确的。我只想知道如何做到这一点的基础知识。我知道调整浏览器大小会对大屏幕有所帮助,但这超出了我的控制范围,因为我不会成为最终用户。我在 24 英寸屏幕上进行开发,但表单将用于各种尺寸。我可以使用 CSS、Javascript 或任何技术。
请不要对桌子争论。我必须使用它们。