Top "Findviewbyid" questions

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

findViewById in Fragment

I am trying to create an ImageView in a Fragment which will refer to the ImageView element which I have …

android android-fragments android-imageview findviewbyid
How can I assign an ID to a view programmatically?

In an XML file, we can assign an ID to a view like android:id="@+id/something" and then call …

android android-view android-resources findviewbyid android-identifiers
Android findViewById() in Custom View

I've written my custom View and i want to update some other views after interacting with my custom view. Main …

android android-layout view custom-attributes findviewbyid
Can not resolve method 'findViewById(int)'

I'm having a trouble with findViewByid but I can't find where the problem is. Here's my FirstFragment class code: import …

android findviewbyid
Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference

When my SplashActivity opens the LoginActivity my app crashes. The following is my SplashActivity.java: package com.example.android.appName; …

java android findviewbyid
using findviewbyid in a class that does NOT extend Activity in android

I have a class that is currently extending Activity and I have methods like findViewById, ArrayAdapter etc. I want to …

android class android-activity findviewbyid
findViewById within fragment

Is there any way to find a view by id within the scope of a fragment? I'm using a series …

android android-fragments findviewbyid
Null pointer Exception - findViewById()

Can anyone help me to find out what can be the issue with this program. In the onCreate() method the …

android nullpointerexception oncreate findviewbyid
No need to cast the result of findViewById?

Recently i found that AndroidStudio reminds me to remove some class cast. I remember that in the old time, we …

android casting findviewbyid
Access Fragment View from Activity's onCreate

I am in the process of making my first app for Android, and I have a Fragment that gets added …

android fragment oncreate findviewbyid