Questions tagged as 'android-activity'

2
answers

Share button

What about people all right? I hope so with the whole Stack community. Well I have a question that is killing me already has time, and I can not solve. First of all I want to remind you that I am a beginner in Android Programming. I want t...
asked by 11.11.2016 / 13:27
1
answer

Error when completing Activity through another class

Can anyone explain why the LISTADO NO FINAL DA PERGUNTA error occurs, terminating the application, when I try to terminate the application through another class: class1.class : ... ... AlertDialogManager alert = new Aler...
asked by 27.01.2015 / 00:15
1
answer

How to leave Activity in full screen?

I have the following activity: Iwouldliketoremovethebarsthatarehighlightedbytheyellowrectangle: IhavetriedtochangeAndroidManifest.xmlbyaddingthefollowingline,buttheapplicationstopsworking:android:theme=”@android:style/Theme.NoTitleBar.Fullsc...
asked by 23.08.2015 / 01:09
1
answer

Unable 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. It was all working perfectly until I put the code that makes the magic happen. The application closed and I did not know why it had already fixed all the er...
asked by 26.10.2018 / 02:50
1
answer

How do I restart the app when it is brought from the background?

I need my app to restart whenever it is brought in from the OS background, so the user is required to log in again. I tried to use finishAffinity() in my onPause() of activity, the problem is that this method is also called when...
asked by 08.03.2018 / 18:46
1
answer

Why 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, would not it be simpler to do as when creating an Activity, such as overwriting the onCreate method and setting u...
asked by 25.01.2018 / 01:04
1
answer

Creating a positiveButton in a Dialog on Android

I have the following method to create a Dialog in an Android application: public static void alertBuilder(String mensagem, Type tipo, Context contexto){ Dialog dialog = new Dialog(contexto, R.style.alert); dialog.setContentView...
asked by 21.06.2018 / 20:36
1
answer

Skip list for another Activity

I am creating an application, at this point in the application, you choose how many products you will get from a List made with RecyclerView and this list will be passed to another Activity where it will be loaded into a ListView. I wanted to...
asked by 19.09.2017 / 18:56
1
answer

Which 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, respostas integer not null, resultado float);");...
asked by 21.07.2017 / 19:35
1
answer

Two Intents starting the same Activity

I have a button to add a Tip and I have another button to edit the already created Tip. I would like to use the same Creation Activity, when it is for editing it would pull the data already created. I'm in doubt how to make the Intent code, I ca...
asked by 16.11.2016 / 00:24