Questions tagged as 'activity'

2
answers

Run Activity while displaying a Fragment

My question is if, while a Fragment is being displayed, the Activity is still running in the background. I know that when you press the onBackPressed() you call the Activity , but I do not know if it's a special cas...
asked by 01.03.2017 / 18:17
1
answer

How can I keep a ListView with their data after returning from another activity?

I'm making a contact application for Android, I'm really new to this. I have a ListView in the MainActivity that should show the contacts or a message in case there are no contacts and a Floating Action Button, when pressed it take...
asked by 24.12.2016 / 07:43
2
answers

Pass objects between Android activities

I have an activity where a series of fields are filled. In it I have a button where when I press it opens a recyclerView, which presents the data of a table. When selecting one of the items in the RecyclerView, I want the object to be passed to...
asked by 20.11.2018 / 20:15
1
answer

Detect onBackPressed () from the main activity

I have an application with a button that takes us from Activity A (Main) to Activity B, I would like that when I close activity B with an onBackPressed () the application A (Main) will detect that it is the activity again active and act by makin...
asked by 13.06.2018 / 23:22
0
answers

How to avoid the loss of information of an activity when I go to another activity or I put the back button?

Good afternoon friends. I have the following problem, I am making a simple application in which it is basically a counter, I have a textview and 2 buttons, one to add and another to subtract the value that is in textview but it hap...
asked by 26.01.2018 / 22:36
2
answers

Is it possible in Android to save in a variable a reference to an Activity to be used later in an Intent?

I have the following code, which listens for the clicks that occurred in the elements of a RecyclerView to call another Activity according to the item pressed. public void onItemClick(MainItem item) { Intent i; switch (it...
asked by 06.12.2018 / 20:51
2
answers

How to do so that when I click on an Item in a listview in Android studio I opened a new activity

How to do so that when I click on a Item of a ListView in Android Studio I open a new activity.xml ? This is the code I have: package com.example.juan.pruebaprueba; import android.support.v7.app.AppCompatActivity; impo...
asked by 18.04.2017 / 17:02
1
answer

RecyclerView duplicating items when starting the application

When starting the fragment and loading the recyclerview, it duplicates the items. private void loadData() { if (categoriaList.size() > 0) categoriaList.clear(); miprogress.setVisibility(View.VISIBLE); db.collection("cat...
asked by 25.04.2018 / 20:23
2
answers

How to prevent an Android Activity from being duplicated

I am currently working with a POS WEB that includes barcode scanning. For this the POS is in WebView , and when I click the button to read the barcode I code the url to send the activity of the bar code reader, since this is native...
asked by 20.09.2017 / 19:47
1
answer

Extends Service and Implements Activity in the same class || Android

I'm trying to make an Android app that hides both the notification bar and the action bar (back to the start, etc), so I had thought about creating a service that hides the action bar because the notification bar does not I have a problem but wh...
asked by 25.01.2017 / 15:41