开发者

Android:Dynamic add Edit Text Box in a Linear Layouts?

Hi I have a Linear Layout its orientation="vertical and it contains 3 Edit Box By default .When i click Add Button ,I want to create n开发者_JAVA技巧ext Edit Box Dynamically ,under the previous Edit box .When click Save button i want to get all contents of edit box .

please Help me
Augustine


You can create a new EditText and then add it to the linear layout using ViewGroup.addView. Make sure that when you add the view, you create a new LinearLayout.LayoutParams. As for getting the contents, you can use ViewGroup.getChildAt() to fetch out the EditTexts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜