Most voted "android-activity" questions
Activity is a component that provides a graphical interface (UI) to allow the user to interact with the application. Use this tag for questions related to the functionality and responsibilities of an Activity, such as its life cycle.
Learn more…373 questions
Sort by count of
-
0
votes2
answers138
viewsGoogleapiclient in Fragments
The app in question, has a main activity and two fragments. There are two information panels, one contains the address list and the other displays a map showing the addresses of the list. The list…
-
0
votes1
answer571
viewsHow 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…
-
0
votes1
answer34
viewsError when trying to include a mapfragment in an Activity
I have an Activity that should go up with the map (Googlemaps). But when implementing some methods, so that I can for example click and add a marker, it breaks, with the following error: Attempt to…
-
0
votes0
answers62
viewsHow to instantiate the Firebase object to my URL, Help with the Error below
package br.com.netcriativa.umadeb.activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import…
-
0
votes2
answers96
viewsTela Inicial Dinamica
I’d like to create something more or less like this: Se(O banco de dados tiver tabela criada) { Manter a Activity Principal; } Senão { Abra Activity de criação da tabela; } In short, android will…
-
0
votes0
answers94
viewsHow to get the answer from an Activity called an Arrayadapter class?
I have the Activity ActLevantamento, where I created a custom layout using a class inherited from ArrayAdapter, class AtributoArrayAdapter. In this custom layout, I have a button, and in the call of…
-
0
votes2
answers1163
viewsError calling another screen
I’m trying to call a second screen in Android Studio, but this giving error. This is the main class: package br.com.olamundo.parametros; import android.content.Intent; import android.os.Bundle;…
-
0
votes0
answers34
viewsParameters between Fragment and Activity
I have an Activity with a Fragment inside, but I want to pass the parameters present in the Fragment when changing from Activity, what I do?
string google-maps android-fragment android-activity intasked 7 years, 6 months ago william silva 21 -
0
votes1
answer28
viewsThe string did not come empty so calls another Android screen
The goal of the Android app is as follows; I statically loaded a list of people into the Person entity, so the tela_activity class would identify whether the list would come empty or filled in, if…
-
0
votes0
answers261
viewsProblems with startActivity error Channel is unrecoverably Broken and will be disposed!
My application is closing unexpectedly while doing a button event in the top menu. When this happens nothing is appearing in the Logcat I’m following the pattern like this: Within a activity I put…
-
0
votes1
answer158
viewsActivity Lifecycle + system.currentTimeMillis()
This activity is about life cycle on Android, I read several materials but I’m still lost? Can someone please explain.…
-
0
votes1
answer134
viewsHow to open a new Activity without closing the Drawer menu?
I have an Activity and in this Activity I have the Drawer menu. How do you call another Activity without the Drawer menu disappearing? I just want to change Activity’s content. I tried to use…
java android android-layout android-fragment android-activityasked 7 years, 6 months ago Lucas Charles 127 -
0
votes1
answer75
viewsActivity Maps restarts every time I minimize
Well, on android 4.2.1 is working, but on another device with android 4.2.2 it restarts, IE, does not save the state of Activity, this problem only appears with the activitys that use map, in other…
-
0
votes1
answer164
viewsHow to make dialog that accesses a view without using setContentView
I am creating a dialog with an Edittext, and I need to take this value in another Edittext, without using setContentView pq do not want to redirect to the dialog xml... Follows the code:…
-
0
votes2
answers332
viewsHow to show a call activity when the device is locked and turned off
I’m developing a Video and Voice app. What I need is to show an Activity the call request when one user tries to call another. I’m already using Firebase Cloud Message to push messages to the…
-
0
votes0
answers178
viewsHow do I capture data from a stream (Song name, album cover, band name)?
How could I capture the metadata of an audio stream and put some data as the album cover, song name, and display it on my Activity.
-
0
votes1
answer313
viewsEdittext with same size Android
I’d like to leave my components <EditText/> the same size but I’m not getting it. <?xml version="1.0" encoding="utf-8"?> <ScrollView…
android android-studio android-layout android-fragment android-activityasked 7 years, 2 months ago User1999 864 -
0
votes1
answer91
viewsHow to open an Activity from a calculation?
I am very lay in android studio and I need to do a program on an IMC calculation. The idea is simple, in the first Activity he asks for his weight and his height, after that he must do the imc (imc…
-
0
votes1
answer67
viewsProgress bar does not appear
I entered everything in the code, but there is no popup bar, I can’t find the error, can anyone help me? Follow the code: package com.example.fantin.cardapio; import android.app.AlertDialog; import…
-
0
votes1
answer242
viewsLose value in getIntent()
My problem is this... I have a routine of notifications that the user click on the notification screen, open a new Activity. In this new Activity I show some information that I search in the…
android android-activity intent broadcastreceiver android-alarmmanagerasked 8 years, 3 months ago Joel Messias Do Nascimento 103 -
0
votes2
answers498
viewsAndroid Activity does not open
I’m making a retrofit connection app, but I’m not understanding why my Activity is not opening. My code: public class CotacaoAlteraActivity extends AppCompatActivity { private ListView listView;…
-
0
votes1
answer560
viewsBigdecimal - Numberformatexception Error
If an editText is not filled in 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,…
-
0
votes2
answers813
viewsStart an app with a screen that isn’t Main?
Hello, I wonder if it is possible to start an application with an Activity that is not the main Activity, and from it call the main, as a kind of login to access the main menu, or even a…
-
0
votes1
answer89
viewsMAINTAIN ACTIVITY BY MINIMIZING
How do I keep my app current when I minimize and maximize the window? I noticed that every app I do, if I minimize and maximize it goes back to initial acitivity, especially in apps that need to…
-
0
votes0
answers589
viewsHow to pass data from Activity to Fragment
I’ve seen some posts about but I couldn’t figure out how to pass a string from one activity for a fragment I got the main: public class MainActivity extends AppCompatActivity implements…
-
0
votes0
answers35
viewsProblem in the Fragment
I have a class that uses fragment, but I’m having trouble calling one of these activity. When I do it for my own App. I want to click on the fragment MsgFragment. Below follows the main class and…
-
0
votes1
answer79
viewsStart an Activity from an item in the bottom navigation (menu bar)
I have the Activity main and a bottom bar navigation with 4 items. When I start the application, it starts, shows the Activity of the first item. I wanted to make it "start" from item 3. Is it…
-
0
votes1
answer185
viewsExpandablelistview - change background color of header title group
I need to change the background color of my Expandablelistview header group to a green color. Anyone have any ideas? Expandablelistadapter public class ExpandableListAdapter extends…
android android-layout android-fragment android-activity android-adapterasked 6 years, 8 months ago Wallace Baldenebre 114 -
0
votes1
answer54
viewsChange visibility
How do I change the visibility of a layout that is in another Active? I want to do this by clicking on an image.. I know how to use the method onClick. only lack the imagination of how to change…
-
0
votes2
answers1328
viewsProblem dragging components in Android Studio
I’m starting to use android studio today, this blue box on the right layout side ta? And every time I drag components into the middle, the button goes up by itself, but the button checkbox is still…
-
0
votes1
answer261
views(Solved) Error running Android app on mobile but working on other devices and emulator
[Solution]: The solution found was to add the attributes android:hardwareAccelerated="false" , android:largeHeap="true" in the manifest I’ve been dealing with Android for a while and I got this…
-
0
votes2
answers78
viewsCreate frame for item list
I need to create a frame for a listview item but I have no idea how to do this…
-
0
votes0
answers151
viewsAdd login to android project
Guys sorry if this is too trivial, but I’m starting to study android, I have an example project that you add note and edit them, this project is already working with this mainActivity: public class…
-
0
votes2
answers1039
viewsHow to force the Landscape/Landscape position?
How to force the Paiage/Landscape position on my Activity forever active and lock the Portrait/Portrait position. I want my app to already start in landscape position and can’t turn to portrait…
-
0
votes1
answer21
viewsAndroid appears message in the log about security configuration
I have an application that queries data on a Webservice using JSON. When I run my application I get the following message in the logs: D/NetworkSecurityConfig: No Network Security Config specified,…
-
0
votes1
answer421
viewsPick selected image and send to another Activity
I wonder if it is possible to take a selected image and send it to another Activity. I’m using Fragments and wanted the layout to look like the image below. Wanted that when the user selects the…
-
0
votes1
answer348
viewsReceive parameters of different Actions and add
Hello, I need to pass the parameters of two screens to the tela_inicio, be the "BALANCE" parameters of the screen balance where it will be passed to an Edittext (lblSaldoAtual) at tela_inicio and…
-
0
votes1
answer199
viewsHow to open an Activity from a java class?
I have a java class called Firebase, this class only does functions of firebase... I’m authenticating a new user in firebase, so far so good.. The problem is that I can not pass to another Activity,…
-
0
votes1
answer68
viewsOpen the APK settings via API
I would like to know how to make the user fall into the application settings (APK) via API, for example, the user put the option "Do not ask again",in the permissions of the application, and I open…
-
0
votes1
answer59
viewsClear list of Activity
I need that when I arrive in the last screen of questions of my application I can only return to the menu screen that is the screen after the main and only in this final screen of questions that I…
-
0
votes1
answer112
viewsUpdate Android App
Hello, I am new to android development and I have some doubts, I am developing an APK using a webview and I am often updating it with some improvements. As I work more than 200km from where the…
-
0
votes1
answer33
viewsClose Activity if Idle
I have an app and I need Activity automatically close if idle, that is, if the user does not touch the screen for 30 seconds, the Activity automatically closes. While the user is using (tapping) a…
-
0
votes2
answers465
viewsComponent ID does not appear in Mainactivity
The problem is this, I add a component in my Activitymain, a button for example, but when I go to do the findviewById(ID) of the component, it does not show his ID in Mainactivity, it was working…
-
0
votes0
answers29
viewsCreate dialog from Activity
I was able to display an Activity in dialog form, but it does not respond to the context. When you click on the edit button in my Recycler View, a form opens for changes. I am using the method…
-
0
votes1
answer195
viewsHow to recover the status of a button with Sharedpreferences on Android/Kotlin on multiple screens?
Friends, I have two activitys, at first I have a sound button on and off and at second I have some buttons like a name button A and when clicked it should know what the state of the sound button is…
-
0
votes2
answers771
viewsMake an Acitivity on Android appear only once
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, only the others. I’ll explain how my project is to be…
-
0
votes1
answer57
viewsPass Volley api data to another screen
I have an application that gets given via api using Volley My code: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…
-
0
votes1
answer21
viewsUse checkbox to go to an Activity
All right? I’m doing a project and I came across an issue that I can’t solve. I have already created an Activity with login and registration for a user, however my business model accepts two types…
android-activity login checkbox firebase-databaseasked 6 years, 1 month ago Fabrício Vieira Barreto 3 -
0
votes1
answer782
viewsHow to reference an xml button of another Activty?
This is the mistake: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.octupus.ramonteste/com.example.octupus.ramonteste.projetoEscolaAluno.MainActivity}:…
-
0
votes1
answer125
viewsAndroid - How to make Navigationdrawer items clickable?
I’m very new to programming. I created a Navigationdrawer with the help of a tutorial. It looks like this: main_activity.xml: <?xml version="1.0" encoding="utf-8"?>…