Questions tagged as 'android-activity'

1
answer

Why pass arguments to a Fragment using Bundle instead of a set method

I recently asked myself a seemingly simple question that I could not answer and found no concise answer. The question is simple: Why use Bundle instead of a set method to pass parameters from an Activity to a Fragment? For example: Case 1...
asked by 13.03.2018 / 19:59
1
answer

Insert ScrollView throughout Activity

Hello, I need to insert a ScrollView into the entire layout . But I can not. Here's my code. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http:/...
asked by 16.05.2017 / 18:53
2
answers

Make an Acitivity on Android appear once only [duplicate]

Well, my question is: How do I make an activity appear only once, and then when the user opens the app again this screen does not appear, just the others. I'll explain how my project is to become clearer. My project is very simple. There ar...
asked by 07.12.2016 / 23:33
1
answer

Change variable of another class

I have two activity / classes, follow the button of my first activity where when I click go to the second activity: public void onButtonClick(View v){ if(v.getId() == R.id.Busuarios){ Intent i = new Intent(Velocimetro.this,Usua...
asked by 19.06.2016 / 00:14
1
answer

How to know which activity is open, running?

I have two activities, Activity1 and Activity2. I need to know if 2 is active or not in both activities. Example: if (activityrunning == activity2){ //do something }else{ //do something else } Thank you!     
asked by 01.02.2017 / 20:41
1
answer

NavDrawer using activities instead of fragments

I'm trying to deploy a NavDrawer in my app but # Part of the code that uses Fragments: private void displayView(int position) { // update the main content by replacing fragments Fragment fragment = null; switch (position)...
asked by 24.01.2015 / 02:48
1
answer

Error trying to execute firebase forgot-password

I'm doing the firebase's forgot password screen and it's giving an error when I put the .sendPasswordResetEmail. This is the version of my firebase: implementation 'com.google.firebase:firebase-core:11.8.0' implementation 'com.google.fireba...
asked by 28.11.2018 / 19:36
1
answer

Close Activity if Idle

I have an application and need to Activity close automatically if idle, ie if the user does not touch the screen for 30 seconds, Activity automatically closes. While the user is using (touching) Activity , it will remain open...
asked by 03.08.2018 / 16:01
2
answers

Save data in an Activity when changing Activity

The program is a counter, by clicking the + button it adds +1 to the cont1 variable ... cont2 ..., I want it when I click on the report and I go back to this page, the data I added to the variable to be there Always when I click on the report an...
asked by 12.05.2018 / 23:02
1
answer

BigDecimal - Error NumberFormatException

If an editText is not populated the APK stops working and returns the error: 10-31 15:06:54.340 4152-4152/com.wms.www.calccred E/AndroidRuntime: FATAL EXCEPTION: main Process: com.wms.www.calccred, PID: 4152 java.lang.NumberFormatException...
asked by 31.10.2017 / 17:44