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
votes3
answers113
viewsproblems in passing data to new Activity
I’m having difficulty when I pass a dice using the put. Extras. My app is crashing and I can’t identify the reason. He is unable to pass the data from one Activity to another. Activity that sends…
-
0
votes2
answers373
viewsProblems with setOnItemClickListener
I’m trying to run this Activity as main, but the application even runs on mobile. The error points to the following lines of code: FormularioHelper helper = new FormularioHelper(activity);…
-
0
votes1
answer223
viewsmake fields mandatory in Kotlin
override fun onClick(v: View) { val id = v.id if (id == R.id.btn_salvar) { salvar() } // Condição para datePicker if (v.id == R.id.edit_calendar_Pessoa) { // definir as datas val c =…
-
0
votes1
answer42
viewswanted my presentation slides to appear only once when the app is installed?
i would like that when the user finished going through the slides of my app would automatically open a new Activity and the slides were destroyed so that they would not appear anymore they would…
-
0
votes1
answer28
viewsAndroid capture device rotation without rotating the application
I have an application with Android Webview, my Activity is configured to portrait: <activity android:name=".activity.MainActivity" android:screenOrientation="portrait"…
android android-layout android-activity rotation orientationasked 5 years, 8 months ago Leonardo Patricio 1,656 -
0
votes2
answers73
viewsLine limit in Recycleview
I have a RecycleView which returns many lines, configure the layout_height for a specific size, more than one cell phone to another the amount of line increases or decreases, I would like to adjust…
android android-studio android-layout android-activity android-adapterasked 5 years, 6 months ago Ari Melo 131 -
0
votes1
answer246
viewsChange the color of the Recycleview line
have a RecycleView and would like to change the color of the line when selected, click the selection I have already implemented and working.
-
0
votes1
answer137
viewsHow to bring an application forward(from the background to foreground)?
I’m finishing an app where the person runs it but usually it is minimized, running in the background. The person executes it, but a lot of the time the person can be playing with other things on the…
-
0
votes0
answers21
viewsBring values from a Text file to a Listview in Android Studio
I have a file . txt on my phone with the following layout: 123;ManoelEntulhos;Simples;AAA-1111; 456;MateusEntulhos;Comum;BBB-2222; And I want to show him in my Listview this way: 123 ManoelEntulhos…
-
0
votes0
answers7
viewsHow to scroll the entire Android screen that contains an Imageview, Textview and Listview? And not just Listview
Hello, everybody I need to roll a screen that includes a listview. When filling the list and it becomes larger than the screen it is normal to scroll the screen. In my case, I want all the elements…
-
0
votes2
answers809
viewsSend data from a Fragment to an Activity
Good Morning Everyone I have a Fragment containing a listview where I list the data coming from a webservice. In the onclick method I have the following code where I pass some values to another…
-
0
votes1
answer703
viewsInsert Scrollview into all Activity
Hello, I need to insert a ScrollView throughout layout. But I’m not getting it. Follow my code. <?xml version="1.0" encoding="utf-8"?> <LinearLayout…
android android-layout android-fragment android-activityasked 7 years, 6 months ago Lucas Charles 127 -
0
votes1
answer18
viewsHow to call a method from another Activity using checkbox?
I’m mounting a simulated app and want to call the questions that are in an Activity through another Activity, where have checkbox to select the theme. button.setOnClickListener(new…
android android-studio android-layout android-activity checkboxasked 3 years, 9 months ago Daniel Diniz Marques 26 -
0
votes1
answer404
viewsBack to Canvas Ragment
Good night, you guys. I have a main and 3 classes Fragment. By accessing the main, I can slide to each Fragment correctly. However, in each Fragment I have functionalities. If I access one of these…
-
0
votes2
answers36
viewsActivity does not return the view
I’m trying to compile but it’s not giving, my layoute is like this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes1
answer279
viewsHow to place a title in Ragment?
I have the code below, which calls a Fragment, in Activity Schedulesearch: @Override public void openFragment(int home, boolean search, boolean changeClickDirection) { if (home == 0) {…
-
0
votes1
answer33
viewsProblems setting an Adapter on the list
I need to create a dynamic list, I do not understand well how it does, some people told me that it is made with adapter and so I’m trying to do. According to break point my data is coming in…
-
0
votes1
answer625
viewsPassing Data from Fragments to Activity
I own an application with a main Activity and within it there is a viewpager with Fragments generated by a list and a floating button. What I want is that by clicking on this button I can return…
-
0
votes0
answers124
viewsI have a problem in Cardview to pull on a layout on Tabsadapter
Hi! I can’t pull my Cardview. I use Tabs to scroll the pages more easily. Instead of just pulling a list of things using Reciclyerview, I pull the Layouts I created. That said, my cardview on the…
-
0
votes0
answers50
viewsProblem with Tabs and Adapter
I got a problem here. I have that code Home Screen: public class Inicial extends AppCompatActivity { private ImageButton button,button2; protected void onCreate(Bundle savedInstanceState) {…
-
0
votes0
answers128
viewsAs of Finish in past Activity
Well I am with the following doubt, has to give finish() in fragment who have passed ? The case is as follows: I have a few screens in sequence where I use for the comrade to choose the snack, then…
-
0
votes1
answer417
viewsCalling a method of the class of the Fragment itself
Good afternoon, I have a Fragment that has the following XML <Button android:id="@+id/salvar" android:layout_width="match_parent" android:layout_height="wrap_content"…
-
0
votes2
answers143
viewsIt is possible to open Activity inside framelayout
Is it possible to "inflate" an Activity ( in this Activity has a recicleview) inside a framelayout ? if not, what I use to open 3 different activitys, keeping the navigation bar down as in…
-
0
votes1
answer1002
viewsUnable to start Activity Componentinfo{}: java.lang.Nullpointerexception
I’m having difficulty finding the solution to this problem, in the code I want to go from Activity "Mainactivity" to "Plantalist", but when testing the application in the virtual machine the app…
-
0
votes2
answers161
viewsNull Object Reference when opening a Dialog Fragment
Making a mistake opening a Dialog Fragment in a another Activity using a method. ERROR: 07-06 11:21:25.145 18783-18783/com.vuforia.samples.Books E/Androidruntime: FATAL EXCEPTION: main Process:…
-
0
votes1
answer53
viewsNavigation Activity
I would like some help when I open my Navigation Activity after login I get it like this: But I wish he was already called that with one of the pages marked like this: activity_main_drawer.xml…
-
0
votes1
answer119
viewsHow to reference an object from one Activity to the other?
Good evening, I am developing an application containing several buttons, in which you can drag a button and drop in a certain place already defined in the application, and each button has to open…
-
0
votes1
answer262
viewsTextview Imageview Constraintlayout Android
I am creating an app in android studio 2.3.3, but when placing an image using Imageview and a Textview it presented the following this view is not constrained.view <?xml version="1.0"…
-
0
votes0
answers335
viewsError creating multiple buttons in XML (Android Studio)
I’m creating an Android app that needs to have 20 buttons and each button of this will open a different screen. The application compiles correctly, but when arriving at the screen that has the 20…
-
0
votes1
answer378
viewsRecover Contact List Name List on an android Edit
All right, guys ? I have a problem in the development of an app, because when I call his registration screen before I want to take the name and phone of the selected contact and send to the Activity…
-
0
votes1
answer37
viewsHow to run a Recicle view on other activitys
How do I place a recicle view or a list view in some other Ctivity ? Example: I created a project with name X dai in it so I put the layout as Empty Activity and such it generates me an…
-
0
votes0
answers113
viewsHow to send data from an Activity to a Fragment?
1I’ve been having a question for a while. I want to pass a value of a activity for a fragment, however, the error when opening the fragment to be specific when receiving this value, I believe. This…
-
0
votes1
answer430
viewsObject list for another Activity
I’m trying to save a list of objects with sharedpreference and gson. And the idea is that I can upload this list to a Listview, I ran the tests and when it goes to listview it only loads the…
-
0
votes1
answer5530
viewsPassing parameter to another Android Activity
I created a QRCode and I made it as soon as it generated the value, it was shown on the screen and I would have the option to say ok or just leave, I would like that when I clicked on Ok it was…
-
0
votes0
answers102
viewsAlarm manager, main screen
I made an app that generates an alarm at 19 hours, is picking up perfectly, the problem is when I pull this alarm from the Main Activity in Manifest, when I do this, the app no longer generates the…
-
0
votes1
answer528
viewsHow to click items from a list in Android Studio?
For now my code is like this ? how do I implement the click of the list items the click would open a new screen ListView lista_teste = (ListView)findViewById(R.id.lista_teste); String[] dados = new…
-
0
votes1
answer176
viewsMake a method on onCreate run once
In my mainActivity I have the method: player.setPlayWhenReady(true) which is responsible for making the player start playing and continues to run in the background while I am browsing between my…
-
0
votes1
answer41
viewsClass control Android internet connection - Wifi-3G
Hello. Currently I control screen by screen the type of internet connection to which the user is connected or not. I use a method similar to this: /*Check conection*/ ConnectivityManager manager =…
-
0
votes0
answers68
viewstwo listview on the same screen but only one appears after execution, helps
I’m trying to make a screen for an app, where I want to put a text, a listview and then one more text and another listview. I made the codes, but at the time of execution only appear the two texts…
-
0
votes0
answers32
viewsAngulation capture
I’m doing a project that consists of capturing the angulation of movement using the cell phone. The angles have already been calculated and are working. The problem I’m having is with the following…
-
0
votes0
answers65
viewsCalling another screen on android
public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle…
-
0
votes1
answer1059
viewsCreate separate method to call Activity
i created a script where I intend to call separate activities but it’s not working package com.example.john.new_login; import android.content.Context; import android.content.Intent; import…
-
0
votes1
answer942
viewsAndroid studio Activity does not open with click button
My problem is the following. my application has a welcome screen where the user ckick the "continue" button and goes to the next screen. The next one contains a menu with several buttons. my problem…
-
0
votes1
answer77
viewsAndroid - Method Invocation 'setOnClickListener' may Produce 'java.lang.Nullpointerexception'
I’m new to Android. Android Studio always warns me about this but I don’t know what it means. Method invocation 'setOnClickListener' may produce 'java.lang.NullPointerException' I would like to…
-
0
votes1
answer76
viewsHow to put only true items in the second Activity?
I’m trying to make a favorite activity, I’ll follow the example of this guy here. In the second Activity I will create how I would put these items set as true in a listview? and play them normally I…
-
0
votes0
answers118
viewsRetrieve information from a Dialog via Activity
Good afternoon, in my project I need to open a search screen to recover an object in a list, until here everything right. Before trying to use Dialog I was using Alertdialog that was serving me very…
-
0
votes0
answers102
viewsonActivityResult in another class
I am creating an app where I have several camera calls, and I would like to create a class to call the camera to use in the project , well, the call from Activity is being made with the…
-
0
votes2
answers84
viewsData sent from one Activity to another arrives null
My Activity I’m displaying the database data in listview @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…
-
0
votes0
answers340
viewsError "Unfortunately Myapp has stopped" when clicking the application button
I’m running my app on Genymotion, developing on Android Studio. Every time I run my application I click on the button to register, but when I click I come across the following message "Unfortunately…
-
0
votes1
answer79
viewsExpandablelistview: Change header title by clicking an item in the list
I need to get the name of the items in the Expandablelistview list, and settar header according to his position, but he’s only getting the last one. Below is my code: Mainactivity public class…
android android-layout android-activity android-adapterasked 6 years, 9 months ago Wallace Baldenebre 114