Skip to content

Tag: android

How to create programmatically CardView

I’m developing an Android app in Java & Android Studio. I want to create in activity a CardView programmatically. I want to set the following properties to the CardView: The card should be created in a GridLayout Answer Here is an example. you can add other parameters as well:

Firebase Authentication email

Currently, I am working on an Android project. I started the project with sign up and login pages using Firebase. It goes like this: A new user enters the required details with email and password as login credentials. Meanwhile, a verification mail is sent to the provided email address, the user needs to veri…

How to access views added programmatically to a custom view?

I have created a custom class that extends from the MaterialCardView class, to which I add a TextView programmatically like this: I create an instance of the CustomQuestionView in the onViewCreated() method of my fragment like this: And my XML code for my fragment where the custom view is looks like this: The…