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
-
1
votes0
answers129
viewsHow to solve the "app has stopped"?
Here’s the thing, I’m setting up an app for my TCC and suddenly there’s another problem, I made a login screen, a registration screen, another to recover the password and finally one that the user…
-
1
votes1
answer92
viewsProgressidialog closing before the Second Activity opens
I have an Activity called Login_activity, when the user logs in, I want a Progressdialog to appear, until the other Activity is fully loaded, because as I will put some things to execute in the…
-
1
votes1
answer51
viewsDo I use Activities or Fragments?
I’m with a project to develop a guide app for games that will show images through a server and the guide will be pdfs files downloaded and opened by the app. The flow would be: Console list…
-
1
votes1
answer87
viewsHow do I change Activity after logging in with facebook?
After loginfacebook(Fragment) I would like to change from Activity, for example to register, as I do? public class Loginfacebook extends Fragment { private LoginButton loginButton; private…
-
1
votes0
answers41
viewsProblem calling Class Activitity
I have a class I intend to call another class through a click on one of the fragments, but it is not responding when calling the other Activity gives an error in the app and application to work. I…
-
1
votes1
answer72
viewsHow do I restart the app when it’s brought from the background?
I need my app to reboot whenever it’s brought from the OS background, so the user is forced to log in again. I tried to use the finishAffinity() in my onPause() of Activity, the problem is that this…
-
1
votes2
answers899
viewsPass data from one Activity to another without starting it?
I’m creating an App for Android, I need to pass String type data from the first Activity(when started), to a third Activity. But without starting it. In case I get the user ID on the first screen…
-
1
votes1
answer120
viewsLinks within the application
I’m trying to get my app to make an emergency call and call a pre-defined emergency number, but when I open Activity she simply for already looked and redid the code 3 times, but the error persists,…
-
1
votes1
answer67
viewsCrashing when starts the 2nd Activity
The first screen is the login, normal log, communicates with the server and such, there goes to second, there is a fragment of google maps, when it goes to second crash the app, the error that…
-
1
votes3
answers109
viewsI made a Splashscreen it carries and it does not go to the Activity prixima what should I do?
What I must do ? intro.java public class intro extends AppCompatActivity { protected static final int TIMER_RUNTIME =5000; protected boolean mbActive; protected ProgressBar mProgressBar; @Override…
-
1
votes1
answer75
viewsshowing only part of the screen when the android keyboard is active
I have the following screen on android and would like that when the user clicked on one of editText, only the 3 fields (name, date of birth and phone) were shown at the top of the screen (above the…
-
1
votes1
answer201
viewsInsert image in Listview via JSON + SQL
I created a code that perfectly brings the results via JSON from my database and fills my Listview with Strings, but I would like the database to bring the "image" column I created, the address…
-
1
votes0
answers32
viewsAdaptation in notifications
Based on some answers found on this site I adapted a code to arrive notifications in a certain time if someone can finalize this code and help me activate the notifications Screen where I should…
-
1
votes2
answers307
viewsListview does not appear in the emulator
I am developing an application in Android Studio and trying to use a Listview, but when I run the project, the list does not appear in the emulator! XML CODE <?xml version="1.0"…
-
1
votes1
answer83
viewsTwo Intents starting the same Activity
I have a button to include a Hint and I have another button to edit the Hint already created. I would like to use the same creation activity, when it is for editing would pull the data already…
-
1
votes1
answer2400
viewsHow do I display the data in an Edittext of an Activity in another Activity?
package com.example.alinesilvagonzaga.teste; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import…
-
1
votes2
answers4044
viewsShare button
And hey guys all right? I hope so with the whole Stack community. Well, I have a question that’s been killing me for a long time, and I can’t fix it. First of all I want to remember that I’m a…
-
1
votes0
answers46
viewsHow to leave two screens in an Activity, being able to exchange one of them via code
Good day, late or night!! I need to make a screen in android split in the middle, where the screen on top screen a video player, and the bottom a chat, where in a due event will be replaced by…
android android-studio android-layout android-activityasked 6 years, 2 months ago Jean Carlos Sampaio 11 -
1
votes1
answer82
viewsImplementation of the Life Cycle of an Activity
Hello. I am new to Android Development and would like to better understand how to build more robust applications for this platform. I understand how the life cycle of a Activity but wanted to…
-
1
votes1
answer670
viewsUnable to instantiate Activity Componentinfo; java.lang.Illegalstateexception: System services not available to Activities before onCreate()
I have a project of a chat socket running in Swing and now I’m passing it to Android. Everything was working perfectly until I put in the code that makes the magic happen. The application closed and…
-
1
votes2
answers441
viewsProblems Saving Sqlite Data - Android
I am trying to save the data in Sqlite database from a form in my app, but when I click save button, the app closes and is shown the following error. Android Studio points the error to this code…
-
1
votes1
answer249
viewsNo suitable Parent found from the Given view. Please provide a Valid view
Good Morning, I have this mistake : No suitable parent found from the given view. Please provide a valid view. I’m entering the registration view and this returning me this message, tried to fix it…
-
1
votes0
answers70
viewsMethod only works when minimizing/maximizing app
I’m developing an app for TCC using Google Places API. A part of the code returns the locations/establishments next to the user. However, when I run the app and enter the responsible class I have no…
-
1
votes1
answer206
viewsKnow the color of Button Android Studio (Java)
Good afternoon, I need to know how to read the color of the Button and store in a variable in java for Android platform but is showing errors, can help me ? Follow my code below: private EditText…
-
1
votes2
answers355
viewsValidate Edittext within Alertdialog
I have a AlertDialog and inside of it I have a EditText and need to validate and after validate run the method enviarEmail(), how do I do? Man AlertDialog : AlertDialog.Builder caixaDialog = new…
-
1
votes0
answers33
viewsWhy did I open a bunch of windows when I used Internet?
I have a ActivityA, contains a ListView and a botão, and I have a ActivityB containing two EditText and a button. When do I start app begins in the ActivityA with empty list, when pressing the…
-
1
votes1
answer31
viewsDifference between Activitycontext and Applicationcontext
What’s the difference between ActivityContext and ApplicationContext? The following code, executed from a Fragment, log the message "are different": if…
-
1
votes1
answer315
viewsGoogle Maps does not load registered points (Java)
Good afternoon, everyone. I’m using Google Maps in my app and was working before but stopped working. The app breaks while the map is being loaded. I’ve researched enough on the internet and no…
android android-studio google-maps android-activity localizationasked 4 years, 2 months ago Laura Regina 304 -
1
votes0
answers16
viewsApp using canvas does not emulate in Android Studio
I made an app in Android Studio, according to codes below, however, when emulating inside an emulator of Android Studio itself, does not run. There seems to be some problem in the Activity instance,…
android-studio android-activity canvas instantiate-object emulatorasked 3 years, 11 months ago CarlosProg 11 -
1
votes1
answer370
viewsImagebutton does not display properly image background
I have a school system with schedule of each course and I have an Activity where the user must select his course to have access to his schedule. This Activity has 5 imageButtons but these…
-
1
votes1
answer79
viewsSpace between Imagebutton Android
I wanted to leave a space between the Imagebutton, and a space between the Imagebutton and the Laterias, but I’m not getting it. I would like the application to be more or less like this: But she’s…
-
1
votes1
answer52
viewsWhen the keyboard is hidden the space is not rendered
I have a problem in one of the Activitys, in this Activity I have a lot of content, so I’m using a Scrollview. The problem is that once I finish typing in Edittext and the keyboard is hidden the…
-
1
votes1
answer87
viewsProblems when creating application to consume postal services
I am developing an application that aims to consult prices and deadlines of orders consuming the Post Office service. However I am having difficulties to implement the service in the application.…
-
1
votes0
answers176
viewsHow to open a screen with navigation Drawer from a button?
I am developing my TCC and do not have much knowledge on Android yet, but following some tutorials I managed to build a basic app. But I’m not getting and I have no idea how to open a screen with…
-
1
votes2
answers1441
viewsHow to call a method of a Fragment in an Activity?
I need to use a Fragment method within an Activity, but I can’t pass a reference to that Activity. Can anyone help me? That’s the whole idea: public class MinhaFragment extends Fragment{ ...…
-
1
votes0
answers77
viewsAndroid app closes when performing calculation
I’m making an app that has a very specific medical calculator. In AVD, the calculation appears divinely well. On real devices, gives error and the application is closed. Somebody help me out there?…
-
1
votes1
answer161
viewsViewholder Pattern in an Activity
Let’s assume that I have an Activity with its layout and, using the Butterknife and the Viewholder Pattern, I create a nested class in which I pass the View root and inject the Butterknife in it.…
-
1
votes1
answer237
viewsWhy inflate a Layout in Fragments instead of setting one already ready? Ex: setContentView(R.layout.activity_example)
I’m learning about Android and would like to better understand how this part of the system works. Instead of inflating a layout, it would not be simpler to do as when creating an Activity, for…
java android android-layout android-fragment android-activityasked 6 years, 10 months ago Nakamoto 1,341 -
1
votes1
answer320
viewsWhy pass arguments to a Fragment using Bundle instead of a set method
I recently asked myself a question, seemingly simple, that I could not answer and I did not find any concise answer. The question is simple: Why use Bundle instead of a set method to pass parameters…
-
1
votes0
answers706
viewsHow to pass an object to another Activity
public class Despesa { private long id ; private Date data; private String local; private String endereco ; private String cnpj ; private LinkedList <Item> itens; private String URL ; public…
-
1
votes1
answer348
viewsAndroid Studio error while passing array between Activity
I’m developing an app that reads the barcode of an item and compares whether or not it exists in a list with database data. When any of these items is not present in the database it should save the…
-
1
votes1
answer133
viewsProblem with updating a Fragment
I am learning Android and while trying to develop an app I came across the following situation: I have an Activity that has two Fragments: ReminderListFragment and FilterListFragment. The first…
-
1
votes1
answer153
viewsCreating a positiveButton in a Dialog on Android
I have the following method to create a Dialog in an Android app: public static void alertBuilder(String mensagem, Type tipo, Context contexto){ Dialog dialog = new Dialog(contexto, R.style.alert);…
-
1
votes1
answer1541
viewsHow to open an Activity via a button
I’m having a problem opening my Activity on various forums and I haven’t found the answer. I have the Activity "Teladelogin" and the Activity "Feed", and I have tried to open in various ways, here…
-
1
votes1
answer214
viewsError opening a new Activity on mobile - Android Studio
Good morning, everyone!! So, I’m new in programming for Android, it turns out I created 3 screens: Leading Categories Attitude The main one is only for it to go either in Categories or Exit. The…
-
1
votes2
answers706
viewsMake Floatingactionbutton Overlay Linearlayout
Hello, I’m making a kind of Actionbar and precise with the Floatingactionbutton overlap the Linearlayout that is fixed at the bottom, it needs to be in the same position put on the front of the bar.…
-
1
votes3
answers45
viewsCiclo Activity android
My app has 4 Activitys. When I get to the Activity number 4 user has option to return to Activity number 2 that this in onStop(). The problem is that when I go back to Activity number 2 she runs…
android android-studio android-layout android-activity android-fragmentasked 5 years, 8 months ago Paulo Castelo 71 -
1
votes0
answers49
viewsEqual text field from facebook
Does anyone know how to let the field insert text equal to facebook ? I need my text to look the same. When I copy and paste the song’s cipher on facebook, it looks the same as the site. But if I…
-
1
votes1
answer247
viewsCould not find method connectionBanco(View) in a Parent or Ancestor Context for android:onClick attribute defined on view class
package com.projeto.comandapack; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText;…
-
1
votes1
answer47
viewsError when taking photo with android camera - Glideexception - Onloadfailed
I’m trying to implement the function of taking the photo with the camera in my app, but without I’m falling into the treatment of failure in Glide onLoadFailed. I have tested other logics and can…