Questions tagged as 'android'

1
answer

bug in Fragments setArguments and getArguments

I'm trying to pass some information from ActivityMain to a fragement but the android is complaining, in ActivityMain I pass values like this: if (f_caixaTexto== null) { f_caixaTexto = new PageCaixaTextoFragment(); f_caixaTexto....
asked by 09.03.2017 / 00:10
1
answer

Drawable Object Parameter Pass

I've created a method to encapsulate a notification message (% with%). An excerpt of the code is shown below: public void exibirMensagem(String titulo, String texto,Drawable icone) { Notification.Builder mensagem = new Notification.Builde...
asked by 17.03.2017 / 00:57
1
answer

What is the best and safest way to identify a device in webservice? [closed]

I'm developing an APP (currently only Android - pure Java), it will consume a webservice made in PHP (I use the Silex mini framework). As we know today we have to protect everything to the maximum, so I took some security measures: I will...
asked by 13.02.2017 / 09:35
1
answer

Insert more items into an Android ListView

I'm a beginner in Java / Android programming, and would like some help with adding items to a ListView. The app receives the first 5 records of a Json (Url), and adds everything in the ListView so far. The app then displays a button, which...
asked by 19.02.2017 / 07:35
2
answers

Error adding Textview by programming

I am having an error in creating TextViews by scheduling the application 'crash' on the screen MainActivity.java package com.example.matheus.login; import android.content.Intent; import android.os.Bundle; import android.support.design.w...
asked by 18.07.2017 / 20:45
2
answers

How to get the return of the method ofInBackground in android?

I'm starting to work with AsyncTasks and I still do not know much. I created a class that extends AsyncTask and implemented the doInBackground() method, but my question now is how do I get the return of this method? In another class in th...
asked by 15.07.2017 / 00:51
1
answer

Programming with android studio [closed]

I'm having an error in my project, the error that appears is as follows:    -> / Error: (23, 31) error: ';' expected / package com.example.lorenzo.pulo; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import and...
asked by 05.08.2017 / 20:11
2
answers

How to recover value of an integer and set in an alertDialog [closed]

When opening the alertDialog the result is zero, follow the code calcular.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String adulto = edit_adulto.getText().toString();...
asked by 01.08.2017 / 04:38
2
answers

Format Timestamp for string without milliseconds?

I have the following variable public Timestamp CreatedAt; It is set to textview this way: hora.setText(String.valueOf(notificacao.CreatedAt)); The output is:    2017-06-29 12: 31: 21,759 I would like it to be:    6/2...
asked by 29.06.2017 / 20:31
1
answer

Recovering information passed in a Bundle

I have a Fragment that calls another fragment passing login information to the other. I do this with the following code through the Bundle. Here is the code: ImageView editarBt = (ImageView) view.findViewById(R.id.editar); editarBt...
asked by 26.06.2017 / 17:44