Questions tagged as 'android-activity'

1
answer

How to prevent a new instance of Activity from being created at each Intent

In my application I have a BroadCast that receives push notifications in background , this push currently opens an activity with the information of a request to be accepted, what happens is that if the same instant is...
asked by 28.08.2016 / 22:24
1
answer

Creating custom toolbar, action bar

I'm creating a separate toolbar to facilitate development I'm trying to make a simple toolbar but I can not do it. How I want to do: link My code: <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns...
asked by 15.10.2016 / 22:06
2
answers

Close Previous activity makes application faster?

I was developing an application for Android and I had a question: In my main class MainActivity I have the setContentView function that initializes my screen, but if I want to open other Activity I need to close the previ...
asked by 13.02.2015 / 22:48
1
answer

Placing click event on the button that is in a Fragment, in an Activity?

I want to put a setOnClickListener on the button that is in a fragment, through my activity. Here are the codes: Activity: private Button mButtonCriarConta; // onCreate da Activity... mButtonCriarConta = (Button) findViewById(R.id.emai...
asked by 10.11.2015 / 16:07
2
answers

Reloading an activity

I have the following problem, in my application I have a ListView in act 1 , and I make a register in act 2 , however when I finish the registration I also end act 2 , with this return to act 1 , the problem is tha...
asked by 22.09.2016 / 05:03
1
answer

Android using findViewById from another activity

I need to assign a value to an element that is in another activity I'm trying this way: MainActivity activityprincipal = new MainActivity(); WebView view = (WebView) activityprincipal.findViewById(R.id.webView);     
asked by 22.02.2017 / 17:42
0
answers

Carrying information between Activities

I'm new to Android and I have the following problem. I have a screen (Activity) where the payment condition and the type of payment are informed. Clickingonthepaymentconditionfieldopensanotherscreenwithalistofpaymentterms When I click o...
asked by 28.11.2016 / 18:30
1
answer

Close all Activities

I have 3 activities: splash_screen MainActivity error_webview activity error_webvie has two buttons, one to open the splash_screen and another to close (Exit), but wanted to click "Exit" activities and the application did not ope...
asked by 14.08.2016 / 18:47
1
answer

Read in another activity a variable that is updated in MainActivity

I have a function that runs every second. This function sends a request for information via socket to a device. This information is received in AsyncTask which does the calculations and updates some variables that are in MainActivity...
asked by 17.01.2017 / 15:11
2
answers

ListView Doubt

I have the following code where I am in doubt as I do to display the list on the screen, I have already tried in several ways and I have already done several examples of the internet I could not find a correct solution to my problem. The error...
asked by 28.09.2017 / 05:19