简体   繁体   English

如何获得动态编程的按钮

[英]How do I get the button dynamically programmed

I am new to the xamarin development. 我是xamarin开发的新手。 I am working on an app that adds the information from the SQLite database about the user. 我正在开发一个可从SQLite数据库添加有关用户的信息的应用程序。 But my problem is it should dynamically create the button to show the user info after entering the info in the database. 但是我的问题是,应该在数据库中输入信息后动态创建按钮以显示用户信息。

I am able to get the information from the database and shows it on the activity but unable to create the button as shown in the picture. 我能够从数据库中获取信息并将其显示在活动中,但是无法创建如图所示的按钮。

I am not sure if button will solve the issue or this is a list view. 我不确定按钮是否可以解决问题,或者这是列表视图。

此图显示了我要执行的确切步骤。按下+按钮后,我需要输入数据,但是如何创建按钮,例如:ID_Card或Whatever?

This is a list view as it is dynamically populated and also has a separator. 这是一个列表视图,因为它是动态填充的,并且具有分隔符。

You can create a custom cell with a image view, text view and a disclosure indicator.You can reuse this cell within the list view. 您可以使用图像视图,文本视图和公开指示器创建自定义单元格。可以在列表视图中重复使用此单元格。

You can go through this sample on List views. 您可以在“列表”视图上浏览样本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM