gpt4 book ai didi

java - 如何关闭充气层?

转载 作者:行者123 更新时间:2023-12-02 01:01:04 25 4
gpt4 key购买 nike

我在充气层上制作了关闭按钮。当我单击该按钮时,我想关闭这个膨胀的层。我该如何解决这个问题

我使用了Rl.setVisibility(View.GONE);但是当我重新启动此方法时,它无法正常工作。(不同的层出来了...所有按钮都不起作用)

public void layer(){
final LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final RelativeLayout Rl = (RelativeLayout) inflater.inflate(R.layout.menu_bookmark, null);
//Rl.setBackgroundColor(Color.parseColor("#99000000"));
final RelativeLayout.LayoutParams paramRl = new RelativeLayout.LayoutParams
(LinearLayout.LayoutParams.MATCH_PARENT, WRAP_CONTENT);

addContentView(Rl, paramRl);
final String current_url = webView.getUrl();
final Button btn_add = (Button) findViewById(R.id.btn_add);
final Button btn_out = (Button) findViewById(R.id.btn_out);

final EditText editText = (EditText) findViewById(R.id.edit_input);
editText.setText(current_url);
final ListView listView = (ListView) findViewById(R.id.lv_bookmark);
final ArrayList<String> arrayList = new ArrayList<String>();
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, R.layout.menu_bookmark_row, arrayList);
listView.setAdapter(arrayAdapter);
btn_add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (editText.getText().toString().length() > 0) {
String inputStr = editText.getText().toString();
arrayList.add(inputStr);
arrayAdapter.notifyDataSetChanged();
}
}
});
btn_out.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// <--I NEED HELP!!!!!
}
});

最佳答案

关于java - 如何关闭充气层?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57768237/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com