Questions tagged as 'android'

2
answers

How to create an ID to be used in other classes

My application will do a get on the first screen of the user ID, how do I use it in other activities without being via intent ?     
asked by 24.07.2017 / 15:11
1
answer

How can I avoid repeating code?

I have a command that will need to perform several execuutes, but I have to put 1,2,3 ..., can you use the same name? btnadd1.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { /...
asked by 12.06.2017 / 22:23
1
answer

Set FloatingActionButton size on Android

private FloatingActionButton createButton(int id) { FloatingActionButton fab = new FloatingActionButton(this); fab.setId(id); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v)...
asked by 29.06.2017 / 23:45
1
answer

Email validation [duplicate]

How to make this edittext only valid for an email? That contains for example [email protected] that contains at least the "@"? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...
asked by 12.07.2017 / 14:41
1
answer

How to get genre from a Google user in an app using Firebase?

I'm developing a native Android application and the form of authentication is by Google profile. I would like to get the gender of each user, at signup time, to verify whether it is male or female. Is it possible to do this? In this question...
asked by 12.07.2017 / 15:13
1
answer

Retrieving EditText text in AlertDialog

Good afternoon, I have a problem ... Clicking a button brings up the custom alertDialog, that is, it contains an EditText in it and a positive button for completion. Only I need to retrieve the text of the editText so I can insert it into my d...
asked by 13.07.2017 / 21:36
1
answer

Do not add to the database when any value is null

How do I not add to the database when the String day is null? Code: public boolean insertData(String disciplina,String sala,String dia,String hora){ ContentValues values = new ContentValues(); values.put(COL_2,disciplina);...
asked by 12.07.2017 / 23:02
1
answer

Update BD after entering record

I use the following code to insert a record in sqlite: public void InsereSenha(String Nome, String Senha, String Dica, String Anotacao) { String sql = "INSERT INTO Senha (Nome, Senha, Dica, Anotacao) VALUES (?, ?, ?, ?)"; try {...
asked by 11.07.2017 / 20:57
1
answer

Permissions file AndroidManifest.xml [duplicate]

When you install app with Google Play, the app emits msg "App Stopped" so I have to go to Settings-> App-> APP and give the permissions manually. Follow the permissions I need and are in the AndroidManifest.xml file <uses-permissio...
asked by 03.07.2017 / 17:09
4
answers

How do I insert a button after a listview?

Hello, I need to insert a button right after my listview. That is, when I finish sliding my listview will have a button at the end. I'm trying to do as follows: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"...
asked by 08.06.2017 / 20:20