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
-
2
votes0
answers201
viewsChange application background in "recent apps"
How to change the application background when you click the square button (recent apps)? I have already researched and some have indicated using the onPause and onStart to change the background…
-
2
votes1
answer438
viewsConvert Activity to Fragments
Hello, I’m in need of a lot of help, I’m developing an application for my TCC, I’ve assembled most of the features and now that I’ve been messing with the visual part I’ve had problems, I mounted…
android android-studio android-fragment android-activityasked 7 years, 7 months ago Projeto Bentotec 63 -
2
votes1
answer72
viewsI need to create an Intent inside another Intent
Created a Widget APP with 3 buttons. In this code snippet assigns button functions: for (int i = 0; i < N; i++) { int appWidgetId = appWidgetIds[i]; RemoteViews views = new…
-
2
votes1
answer92
viewsjava.lang.Nullpointerexception: return null button
Good Morning, How do I reference a button from another Activity? In main, I am using another layout to inflate my list, and the button event is obviously returning null because it is not finding the…
-
2
votes1
answer479
viewsIs it normal not to see anything indicating if I have implemented ads correctly in my app?
Obviously I don’t expect any real adverts to appear, but some indication that I did the procedure correctly so I know if it’s all right. 1st Image (Preview Android Studio) 2nd image (Application on…
-
2
votes1
answer299
viewsHow to recover several actions from one Active to another?
How do I send an Activity url to another with different click actions (multiple buttons)? I tried to use intent.putextra but I can’t recur the urls of the other buttons, in case I’m using two…
-
2
votes2
answers53
viewsDoubt Listview
I have the following code below where I am with doubt as I do to display the list on the screen, I have tried several ways and I have done several examples of the internet I could not get a correct…
-
2
votes1
answer518
viewsAttach File to Gmail via Intent
I have a problem... When I try to open Gmail via Intent to attach a file, it pops up the part of writing a new email, but it doesn’t attach my file. The PDF is inside a folder of the app itself with…
-
2
votes0
answers398
viewsHow to modify the Navigation Drawer to call an Activity
People I created a navigation Drawer by google gallery (Navigation Drawee Activity) and would like to modify it for when I click the menu instead of calling a file extent Fragment call a normal…
android android-layout android-fragment android-activityasked 6 years, 11 months ago Maria Eduarda 63 -
2
votes1
answer262
viewsHow do I send multiple values to a single Activity
Good morning, everyone, I have the following situation: I have 4 screens (Activity), they are: Mainactivity, Disiplinaactivity, Avaliacaoactivity and Resultfinalactivity. The point is, the data…
-
2
votes1
answer187
viewsHow to open an Activity when you don’t have internet?
I’m with a project that uses internet, and when there is no internet the same does not leave the menu because I put a lock access to other activit when there is no internet, but in did not open I…
-
1
votes1
answer1836
viewscall a main Activity method from a Fragment button
I am using a standard android Activity, the "Navigation Drawer Activity", and There is a button in the navigation bar public boolean onOptionsItemSelected(MenuItem item) { if…
-
1
votes1
answer213
viewsWhat is the name of this screen on android?
I would like to know the name of this screen on Android to add so in my project . I thank you already .
-
1
votes1
answer478
viewsError when finishing Activity through another class
Can anyone explain why the error occurs LISTADO NO FINAL DA PERGUNTA, terminating the application, when I try to finalize the application through another class: Classe1.class: ... ...…
-
1
votes1
answer121
viewsUse Notificationmanager in a class that is not Activity
I’m having a little problem and I’m not making it. The problem is this: I have a Fragment in my app, and I want to fire a notification from it. The line I’m having problems with is this:…
-
1
votes2
answers7960
viewsHow to close an Activity(remove from Foreground)?
I have the following code in my Mainactivity class that has a Alertdialog and processing in the onClick method(): import android.app.Activity; import android.app.AlertDialog; import…
-
1
votes1
answer271
viewsWhen running an Activity I want the execution to wait for the shutdown to continue, or run sequentially the code
How do I run an Activity and after closing it continue executing the code from where it stopped, example: listmarcacoes.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override…
-
1
votes0
answers198
viewsjava.lang.Runtimeexception: Unable to start Activity
My logcat is displaying a pointer error to start the activity Ouvir I can see but I didn’t find the error. Exiting these messages when I run the application: 11-27 22:09:40.631:…
-
1
votes2
answers355
viewsChange Status Bar to transparent in a Fragment within an Activity
I have a Activity which has a theme for its Status Bar, but it has an influence on a Fragment I want another color in the Status Bar. Is there any way I can change the color of the Status Bar just…
-
1
votes4
answers197
viewsCalling Gridview event in Activity
I have a Gridview Adapter and in it I possess a ImageButton to delete items. It is deleting correctly, however, every time an item is deleted I need to set the current quantity in one TextView that…
-
1
votes0
answers29
viewsIdentify if the app is in the background or just switched from Activity
Is there any way to determine if the app was for background or just if it switched from Activity?
-
1
votes1
answer673
viewsNavigation Drawer Activity
I’m having a problem in an application I’m developing in Android Studio, it has the option to insert a Activity (Navigation Drawer Activity) then I inserted it and put a button to call it. The…
-
1
votes1
answer427
viewsHow to remove the back button on android
How do I remove this back button from my application?…
-
1
votes1
answer203
viewsHow to open a Dialog without darkening the Android background screen
I have an Activity, and in this one I call a Dialog, but when I open this 'popup' the background Activity screen that called it darkens, but I wish that didn’t happen. You can do it?
-
1
votes0
answers70
viewsCapture android power button event with locked screen
I need to capture the event of the power off button android, and make when it is pressed a certain amount of times, appear an activty above the screen to type password. Pressed 5x the power button…
-
1
votes1
answer220
viewsMenu does not call Activity
My menu doesn’t call Activity, I’ve done some tests and it doesn’t work, I don’t know what else to do. Can someone help me? package com.chl.infotrans.infotrans; import android.content.Intent; import…
-
1
votes1
answer970
viewsChange variable from another class
I have two Activity/classes, follow the boot of my first Activity where when I click goes to the second Activity: public void onButtonClick(View v){ if(v.getId() == R.id.Busuarios){ Intent i = new…
-
1
votes1
answer3299
viewsHow to leave Activity in full screen?
I have the following Activity: I would like to remove the bars that are highlighted by the yellow rectangle: I’ve tried changing Androidmanifest.xml by adding the following line, but the application…
-
1
votes2
answers1472
viewsHow to destroy my Activity?
I need to destroy my Mainactivity when I exit the app. How can I do this?
-
1
votes2
answers459
viewsEdittext without Focus by Activity
Is there any command in the Activity that prevents a EditText to receive focus even with the user clicking? Or this can only be done by XML? I have a repository that is connected to a database and I…
-
1
votes1
answer462
viewsHow to reuse code from one Activity in another?
I am creating an application in android studio in which I have a menu, I am using this menu in several activitys using "include", so in each Activity I need to rewrite the functions of the menu…
-
1
votes0
answers129
viewsProblem when passing Arraylist to another Activity
Good evening, I’m having trouble passing a Listview from one Activity to another. The Activity code that passes to the other is the following, called Filtrarimoveis.class: for (int i = 0; i <…
-
1
votes0
answers914
viewsMove Images from one screen to another Android
I’m having a problem with an app I’m creating. There is an application screen that takes data from parse.com, in this case an image, and wanted to pass it to another screen, but without losing…
-
1
votes1
answer240
viewsActivity does not change
I’m a beginner in Android and am creating an app that has two activities (SplashScreen and ActivityMain). I managed to bring out the SplashScreen after much sacrifice, however, when installed on the…
-
1
votes0
answers140
viewssetOnItemClickListener not working when clicking on a Listview line
I’m beginner in android development, and I came across a problem that I can’t solve. Well, I put a listview within a view_pager (content_main) which is included in activity_main. When I click on a…
-
1
votes1
answer138
viewsRegressive Clock
I’m developing a game. Usually in games there is a small clock that counts a few seconds backwards, kind of 10 to 0, and I would like to put one in my game. How can I do that ? PS: I’m using Android…
-
1
votes1
answer112
views"Unfortunately, *my app* has stopped" in the data pass to Activity
I’m making an app that formats bibliographic references according to ABNT, but there’s been an error to pass the data typed by the user to the next activity, that displays the formatted data. Follow…
-
1
votes0
answers35
viewsHow to call an Activity from a click on an item of an Expandablelistview?
I’m developing a project where there’s a tablayout and in one of the tabs an expansive list. However I wanted a method so that when clicking on the specific options of the expandable list open…
-
1
votes1
answer168
viewsHow to return to the top of an Activity?
Following the standards of Material design, by clicking on a button of a Bottom Navigation that is already active, Activity should roll to the top I have a Framelayout with Coordinatorlayout, which…
-
1
votes1
answer986
viewsHow to change Activity within a Button Ragment?
I have a simple App, has two areas, one with the Fragment and another with a Button Group (Imagebuttons) How to do so that by clicking the buttons I can change which Activity will be loaded in…
-
1
votes2
answers1100
viewsIntent stopping the App in Android Studio
I have a problem with Intent, something that was supposed to be simple is causing me problems... I’m trying to create a second button for call another screen, but as soon as I add the following code…
-
1
votes1
answer1114
viewsHow to pass information between screens, using Bundle and Classes with Get and Set?
I’m trying to pass information from one screen to another. I’ve tried to (2) two manners: 1) I created a class only to create variables and encapsulate the methods 2) Now, I’m trying to get past…
-
1
votes1
answer163
viewsBackground image covering the navdrawer
I have an Activity with a navdrawer on it. And I’d like to put a background image on this Activity. But when I put the image, the Nav disappears, the image is over it. Nav does not lose function, if…
-
1
votes1
answer54
viewsWhich type to use to store values that are in an Arraylist<> in an Sqlite table?
I have the following table in Sqlite: db.execSQL("create table amc(_id integer primary key autoincrement, nome text not null, contratada text not null, tipo text not null, data text not null,…
-
1
votes1
answer193
viewsHow to leave my Activity in 2 plane by executing a function ?
My project is to put a Webview in Activity and when I quit the application, and it stay at 2° plan updating from time to time the Activity so that the site that is Webview also updates. someone help…
-
1
votes1
answer83
viewsHow to compare data from different activities?
I’m developing a simple app just to increase my knowledge, and I want to know how I can compare data between activities? Example: Activity1: In this Activity I have the variable A which has as value…
-
1
votes1
answer302
viewsPass list to another Activity
I am creating an app, at this point in the app, you choose how many products you will get from a Recyclerview List and this list will be passed to another Activity where it will be loaded in a…
-
1
votes1
answer71
viewsError trying to save result to database
I would like to record the contact name and contact number in the bank. So I can use it in other activities. But, when returning, from the contact screen to the Activity in question, an error…
-
1
votes0
answers62
viewsLeave Activity "darkened" when I click and open a listview on top of Activity
I have an Activity with items (recyclerView), when I click on an item, I "show" a listview on top using setVisible(VISIBLE). I want when the listview comes up, the Activity at the bottom will be…
-
1
votes2
answers54
viewsPassing values between screens
I would like a help, I’m new in android development and I’m trying to develop an app. Basically I will need 4 "screens" where the 1 is typed a value, goes to the next, in this "screen" chooses an…