Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to change gridView child background at given position in android from another activity?

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 583
    Answer it

    I actually want to change particular background of grid view from another activity at user given position. But when i go to activity which contains grid view , add call gridView.getChildAt(position) i got an error .getGetChildAt() call on null object reference. NullPointerException. Thanks

 1 Answer(s)

  • From your question, it seems that you want to make a change in gridview from the Activity/Fragment/Service which is not holding the gridview
    For changing in a view from different activity you can use following techniques:-
    • Dynamic BroadcastReceiver
    • Event Bus
    Note:- It would be good if you can provide some code so that we help you more accurately. 
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: