F
F
FalKeN2014-05-21 01:55:49
Java
FalKeN, 2014-05-21 01:55:49

How to access an element (or an Activity method) from the Application class?

Good evening, I'm still new to Android. I am developing an application that receives messages from a computer using the singleton principle. How do I access an element (eg TextView) in a running Activity, the Application class acts as a singleton?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
svd71, 2014-05-21
@FalKeN

in the designer, add a specific id to the desired TextView (for example, myTextView). Next, add the following text to the end of the onCreate() method.
Further work is already underway with myTextView.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question