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
-
11
votes1
answer336
viewsWhy serialize object to send in another Activity?
What is the explanation for serializing the object both using the implementation serializable or Parcelable. I know this serves to create a new instance of the object in the other activity, but why…
-
9
votes1
answer4596
viewsWhat is the difference between Appcompatactivity and Activity?
What is the difference of AppCompatActivity for Activity ? From which version to AppCompatActivity was added to the Android?…
-
9
votes1
answer38768
viewsClick the button and open another Activity
I am developing an application in JAVA , and will have 2 options for the person to choose, I want when she press in 1 of the 2 buttons open a new Activity in the application, Can anyone please tell…
-
8
votes1
answer660
viewsCommunication between Fragment and Activity
I’m making an Android app that uses time and date switches (Datepicker and Timepicker), which are displayed in the form of Fragments. When the user sets the desired time, I need it to be passed from…
-
8
votes1
answer692
viewsWhat is the difference between Activity and View on Android?
What’s the difference between Activity and View on Android?
-
7
votes2
answers151
viewsHow to remove Progressbar margins?
I added a ProgressBar simple to a LinearLayout, however I noticed that it generates a margin above and another below, such as this in the image: These two white tracks, I tried to remove anyway, the…
-
6
votes1
answer4491
viewsMake URL open in the same Activity
I’m creating a WebView for Android. When I load the App, the imported page works perfectly, but when I click on some link page, that same link opens in another browser. I wonder how I can make all…
-
6
votes1
answer1057
viewsHow to detect if the system supports hardware acceleration?
Currently I do this so that one of mine activity that require acceleration work: <application android:hardwareAccelerated="true"> <activity ... /> <activity…
-
5
votes2
answers5176
viewsHow do I put an external source in my app?
I’m trying to put a custom font in my app, but I’m having too many mistakes. I’ve tried using Pixlui, I’ve tried several different codes and always error, or the application runs, but crash (app…
-
5
votes2
answers1800
viewsHow to return Activity call data to the one who called it?
I saw several examples of passing data between Activity of a Textview receiving data from a Edittext. Which is the best way to do the reverse, I explain: I have a reader that reads a barcode and…
-
5
votes2
answers1211
viewsPassing data between Activity Android
Well, I’m making an app and I have a login screen that connects to the database from a web service, only q I’m having a problem want to get the user id and user name to pass this data to another…
-
5
votes3
answers5735
viewsWhat is the basis for.Oncreate(Bundle) and what is Bundle?
I’m starting with Xamarin studio and wanted to know what this "base" class is for, this method onCreate() and what is bundle?
-
4
votes1
answer95
viewsActivity has Leaked window Android
I make a connection with Mysql and it returns me a JSON that I play on a list of products. When I click on one of these items it takes the ID (I call PID in the code) of the product and sends it to…
-
4
votes2
answers312
viewsProgramming for Android with multiple screens
When I program for Android, I think of portability with the most diverse devices on the market. Seeing the layout of my Activity principal, I noticed that in devices with small screen (I did the…
-
4
votes2
answers1950
viewsClose all the Activities
I own 3 activities: splash_screen MainActivity error_webview To Activity error_webview has two buttons, one to open the splash_screen and another to close (Exit), but wanted to click on "Exit" to…
-
4
votes1
answer628
viewsHow to prevent a new instance of Activity from being created every Intent
In my application I have a BroadCastwho receives push notifications in background, that pushcurrently opens an Activity with the information of a request to be accepted, what happens is that if at…
-
4
votes1
answer102
viewsPicking Strings from other Activitys
How do I pick a String, or more, from another Activity, and then use it in another Activity, someone there can tell me?
-
4
votes2
answers1428
viewsOpen a new Activity from within a Fragment
How do I exit the Fragment screen (extends Fragment) and go to a normal activity (extends AppCompatActivity)? Either way, even using a button, I can’t. It never works. public class Teste extends…
-
4
votes2
answers775
viewsWhat is the real difference between these three ways of changing from one Activity to another?
Guys I have knowledge of three forms that through a simple click on a given button, it passes from the current Activity to another. I would like to know which of these three ways is the best taking…
-
3
votes2
answers1369
viewsConfigure "Activity" hierarchy in "Androidmanifest"
I’m trying to figure out how to set up a Activity to return to the Activity previous in AndroidManifest?
-
3
votes1
answer1651
viewsError opening new Activity
I’m picking up here to be able to make the click on a button, open a new Activity. I looked at the Android documentation on Activity, Intent, the methods to create and yet yes, it doesn’t work.…
-
3
votes2
answers437
viewsClosing Previous Activity makes the app faster?
I was developing an application for Android and I came up with a question: In my main class MainActivity i have the function setContentView that initializes my screen, but if I want to open other…
-
3
votes2
answers1006
viewsHow to reload an Activity
I have the following problem, in my application I have a ListView in act 1, and register with the act 2, but when I finish the registration I also finalize the act 2, with this return to act 1, the…
-
3
votes1
answer2358
viewsPlacing event click 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. Follow the codes: Activity: private Button mButtonCriarConta; // onCreate da Activity...…
-
3
votes1
answer2073
viewsHow to automatically run a method outside of Activity onCreate()
I have a Mainactivity who owns 4 buttons, when the user selects some of them, the button method calls another Activity, which will display a query made in a XML in a Listview of this new Activity.…
-
3
votes1
answer469
viewsAndroid use findViewById from other 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)…
-
3
votes1
answer334
viewsHow popular is Alertdialog in Android Studio?
I’m taking a shit here from Java and Android Studio. I have already created an Activity + Dialogfragment, Location information does not pass from the Activity screen to Dialogfragment! Now I’m…
-
3
votes1
answer37
viewsIs it possible to have native content(layouts, classes) in a hybrid application?
I need to run some native Android layouts and classes in my Ionic project there are some plugin?
-
3
votes1
answer1313
viewsCreating custom Toolbar, action bar
Guys I’m creating a separate Toolbar to facilitate the development I’m looking to make a very simple Toolbar but I can’t how I want to do: http://prntscr.com/cuipex my code: <?xml version="1.0"…
-
3
votes0
answers56
viewsHow to transport information between Activities
I am a beginner in Android and I have the following problem. I have a screen (Activity) where is informed the condition of payment and the type of payment. Clicking on the payment condition field…
android-activityasked 7 years, 11 months ago user61617 31 -
3
votes2
answers772
views...on a null Object Reference
Hello, I am at a time with this problem and I can not find solution, I have looked thousands of topics and I can not understand yet why this error appears to me. Error…
-
3
votes1
answer355
viewsRun Html5 inside Webview android
I have a page in Html5, where I would like to open it in Webview android, but it seems that Webview does not interpret javascript. There is a better Webview? See my code: Mainactivity package…
android html5 android-studio android-layout android-activityasked 5 years, 6 months ago Tiago 2,377 -
2
votes1
answer151
viewsHow to send a die to an already created Activity?
I’m in the Activity A and I sent you a note from putExtras() to the Activity B that has not yet been created, in this case it worked, but now I have to send a data from Activity B to the Activity A…
-
2
votes2
answers5290
viewsHow to use onActivityResult when there is more than one startActivityForResult
I need to check user status yes or in the, when requesting bluetooth. Only I already use the same method for voice recognition. Just follow my code: package com.example.audio_auto; import…
-
2
votes1
answer216
viewsIn an Activity, first open the onCreate method or class constructor?
In a scenario where you have an Activity with a constructor (public, of course) and the onCreate method which is part of your life cycle. Which of the two will be executed first?
-
2
votes1
answer108
viewsActivity with background design
Good morning! Friends, I need a light to carry out the development of an Activity with the following layout, as below. The area in orange color should be designed programmatically according to…
-
2
votes2
answers675
viewsError while trying to start another Activity via a button
My program runs, but when I click on the q button I should open a new Activity, the program closes saying there is an error. FATAL EXCEPTION: main Process: com.example.Raissa.calencon, PID: 2142…
-
2
votes2
answers410
viewsAndroid - Transfer Data and Change Fragment by Click
Hi guys. I need help to transfer from Fragment when I click my button inside a Listview. Currently I have a Mainactivity (extends Appcompatactivity) to manage the Fragments. Below are some images of…
-
2
votes1
answer53
viewsConnect by clicking a button
I would like to know how to make that when clicking on a button, a Telephonic call to the number. As I did, he calls Activity Action_diall with the number already written, so the person must click…
-
2
votes1
answer87
viewsHow not to use so many activities?
Hello, I’m starting to program something on android a few days ago (a very simple but extensive shell identification program, in it you have 5 options, within these 5 more some depending on the…
-
2
votes2
answers759
viewsHow to give Restart in an Activity?
I want to re-start my activity without the help of buttons, I want it to restart automatically within a while. How do I do this?
-
2
votes1
answer802
viewsAndroid - Textview Hyperlink to another Activity
Is there any way to format a Textview so that one of your words is a Hyperlink to another app Activity? In this case it is a kind of Dictionary, where in the explanation of the word may have another…
-
2
votes1
answer885
viewsChange Fragment components through an Activity
I’m making an application with NavigationDrawer, and not to create another activity, I’m using fragments, where every click replace in the FrameLayout that I left set as main. How I access the…
-
2
votes1
answer47
viewsFragment being used by two different activties
I have a Ragment that is inflating a Recycler view, so far so good. The problem is that this Fragment needs to inflate into two different Rawer navigation, and when it comes to casting, I can only…
-
2
votes1
answer320
viewshow to show video loop in videoview in android studio
I have a video view on my android app and the background video is set that way String uri = "android.resource://" + getPackageName() + "/" + R.raw.oceans; VideoView mVideoView =…
-
2
votes2
answers278
viewsSending data between View and Edit Activity
I am developing a service scheduling system and in a Listview I can take a customer’s data and move to a Query Activity. I created an editing menu and would like to pass this same data to the new…
-
2
votes3
answers969
viewsCreating an Activity and calling multiple Layouts can be harmful?
As I am still walking in the study of Android applications and read things in this regard, I wonder if, for example, I have only one Activity and several layouts being called from it, there is a…
-
2
votes1
answer58
viewsHold the image and send to link in Android Studio
Hold the image and send to link in Android Studio I use an Imageview that when I click performs a function, but I would like when the image was pressed, another action was done, which would be…
java android android-studio android-activity android-eclipseasked 6 years, 2 months ago Deodoro Júnior 21 -
2
votes1
answer477
viewsRead another variable in Activity 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 on a AsyncTask that makes the calculations and updates…
-
2
votes1
answer65
viewsHow to send a json of an Activity to a Fragment?
I have an Activity that is added a data in Jsonobjetct. And as seen in the following code, I take it as a string, but, my doubt, as I by this Jsonobject in the fragment so that I can work with it,…