Questions tagged as 'android-activity'

1
answer

ExpandableListView: change the header title when clicking on an item in the list

I need to get the name of the items from the ExpandableListView list, and settar in the header according to his position, but he is only getting the last one. Here is my code below: MainActivity public class MainActivity extends App...
asked by 22.02.2018 / 15:40
1
answer

MAINTAIN ACTIVITY WHEN MINIMIZING [closed]

How do I make my app keep current activity when I minimize and maximize the window? I noticed that every app I do, if I minimize and maximize it back to initial acitivity, especially in apps that require login this can not occur, have you though...
asked by 02.02.2018 / 05:28
0
answers

Rectangle movement with onLongPress on Android

I'm trying to make a constant movement of a rectangle on an android screen. By pressing a certain area on the screen I wanted to move that rectangle up. But what happens is that when I press the screen the rectangle moves only the first time by...
asked by 19.01.2018 / 21:57
2
answers

Start an app with a screen that is not Main?

Hello, I would like to know 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 a confirmation to continue. If so, how?     
asked by 19.01.2018 / 20:08
0
answers

How to use listview or recyclerview?

Good afternoon, I'm trying to set up a purchasing system where I click on a product and it appears on another screen as a selected object.     
asked by 23.01.2018 / 19:20
0
answers

Retrieve an information from a Dialog, through the Activity

Good afternoon, in my project I need to open a search screen to retrieve an object from a list, so far so good. Before trying to use Dialog I was using the AlertDialog that was serving me very well, but I needed to do a schematic with onScroll n...
asked by 24.01.2018 / 16:56
1
answer

Android - Method invocation 'setOnClickListener' may produce 'java.lang.NullPointerException'

I'm new to Android. Android Studio always warns me about this but I do not know what it means. Method invocation 'setOnClickListener' may produce 'java.lang.NullPointerException' I'd like to better understand what it's all about and what lo...
asked by 10.01.2018 / 02:35
0
answers

Calling another screen on android

public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle saveInstanceSt...
asked by 07.12.2017 / 23:23
1
answer

Create separate method to call activity

I created a script where I intend to call separate activities But it is not working package com.example.john.new_login; import android.content.Context; import android.content.Intent; import com.example.john.new_login.login.Cadastro; i...
asked by 09.12.2017 / 21:01
1
answer

android studio activity does not open with click button

My problem is this. 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 is that I can not open another activity on the second s...
asked by 10.12.2017 / 02:45