TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Carlos kambui
NA
499
126.6k
dynamic button in android studio
Jun 10 2019 1:15 AM
hi everyone,i have managed to add button dynamically in android studio,
my question is i wont to declare that button public so that i can be able to access it
below is my code
for
(
int
i=1;i<=5; i++)
{
final Button btn=
new
Button(
this
);
btn.setLayoutParams(
new
LinearLayout.LayoutParams(250,250));
btn.setId(i);
btn.setText(
"DATABASE"
+i);
btn.setText(itemArrayList.
get
(i).getCategory_desc()+
""
);
layout.addView(btn);
}
i cant acces that button outside that for loop
any assistance will be appreciated
Reply
Answers (
3
)
basicnetwork.performrequest unexpected response code 301
how to split in android studio