如何创建从编辑文本加载名称的按钮 [英] how to create button with name loaded from the edit text

查看:125
本文介绍了如何创建从编辑文本加载名称的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何动态添加按钮



例如我创建了一个名为setting的按钮。



和此设置按钮应负责在活动中创建新按钮。



所以当我点击此设置按钮时,其他活动中的编辑文本打开



我在编辑文本中输入了按钮名称,这个按钮创建了第一个活动,其名称在第二个活动的编辑文本中加载。



i表示应该使用从编辑文本加载的文本创建一个按钮。



edit text = typed text = create button用这个名字



它表明它就像一个设置按钮。

how to add button dynamically

for example i created a button named setting.

and this setting button should be responsible for creating new buttons in the activity.

so when i click on this setting button the edit text open in the other activity

and i typed the button name in the edit text and this button create to the first activity with name in which loaded from the edit text from the second activity.

i mean that a button should to create with the text loaded from the edit text.

edit text=typed text=create button with this name

it show that just a like a setting button.

推荐答案

它不能动态创建一个按钮。您想根据需要最初创建按钮。您可以决定可见性,启用\禁用按钮



在某些情况下,您可以添加按钮。查看此链接
It's not able to create a button dynamically. You want to create the buttons initially according to your need. You can decide about visibility, enable\ disabling of a button

In some cases you can add buttons. Check this Link


这篇关于如何创建从编辑文本加载名称的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆