Top "Findviewbyid" questions

findViewById(int id) is a method of the View and Activity classes.

Can not find a View with findViewById()

I cannot find a TextView by calling findViewById(), even though the ID does exist. OtherActivity: public class OtherActivity extends Activity { @…

android android-layout android-view findviewbyid
findViewById() returns null for Views in a Dialog

The problem is, no matter where or how I call for this layout's components, they always return null. setView(inflater.…

android nullpointerexception android-resources android-dialog findviewbyid
How do I "findViewById" with fragments?

I recently moved my project to Android Studio from Eclipse. I am trying to get the email functionality working, however …

android android-fragments findviewbyid
Android fragment - findViewById returns null

I have a problem that seems to be quite common on the internet : I have created an activity with just …

android android-fragments nullpointerexception findviewbyid
How to use view binding in Android

I have been using findViewById and then ButterKnife to bind views. Recently, I came across this article: https://proandroiddev.com/…

android findviewbyid android-viewbinding
FindViewById where ID is dynamic string

I have a table of 40 squares and each has an ID. When I'm passing Bundle from another activity I need …

android eclipse findviewbyid
Swift: get UI objects by ID?

in iOS, is it possible to assign a string ID to UI objects and then retrieve them in the code …

swift tags findviewbyid state-restoration
Casting to Button is redundant - Why?

I've just came across this interesting message from the compiler and I do not know why is it happening. Here …

android button casting findviewbyid
findViewById inside a Static Method

I have this static method: public static void displayLevelUp(int level, Context context) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_…

android static-methods findviewbyid
Cannot resolve method 'findViewById(int)' in Fragment

I am trying to implement a button into a fragment in order to use the soundPool in order to play …

android android-fragments findviewbyid