Questions tagged as 'android'

2
answers

Start / pause button

I'm making an application where there will be several buttons, each one will play a different audio. The reproduction of the audio works me the problem is that if you press the button again it does not stop, instead it plays it again without sto...
asked by 14.12.2017 / 23:20
3
answers

How can I validate an email on android [duplicated]

I have this code to validate emails: public static boolean validarEmail(String email) { Pattern pattern = Patterns.EMAIL_ADDRESS; return pattern.matcher(email).matches(); } But is there another more complete and comprehensive way...
asked by 24.11.2017 / 07:54
2
answers

Edittext's default style

I have a EditText that looks like this: When doing an action in EditText the background is changed with the following code: edtCampo.setBackgroundColor(Color.RED); Then another action is made and the background...
asked by 06.12.2017 / 23:52
2
answers

Avoid blank lines when reading a .csv with opencsv in Java Android

I use the opencsv library to read the contents of a .csv file I have the following: String fileName = "file:///storage/sdcard1/maptest/cvs_test1.cvs"; final File file = new File(Uri.parse(fileName).getPath()); try { CSVReader reader =...
asked by 18.11.2017 / 17:50
1
answer

Error loading image from path with BufferedInputStream

Good morning, I'm trying to send an image from JAVA-ANDROID to a server via ftp, this is the code I'm using within an asynchronous task. try { FTPClient ftpClient = new FTPClient(); ftpClient.connect(InetAddress.getBy...
asked by 09.02.2018 / 20:50
1
answer

Drag marker in Android Google Maps

It is possible to do this in android studio, I have my map but I need the user to drag the marker to specify something. I know how to get my current lat and lng but how can I implement the drag?.     
asked by 05.12.2017 / 10:51
4
answers

Use a variable as a file name?

I need to create an XML file whose name is the title and the date when it was created, to differentiate it from the other XML. The problem is that when I try to create the file an exception is thrown if the name of this one involves a variable:...
asked by 05.12.2017 / 14:34
3
answers

My class does not find my layouts or activities android

My application is connected to a firebase server, and I have created a class to check if the data has been changed and, if so, go to a specific layout or activity: package com.example.gerard.presentacio; import com.example.gerard.presentacio.R...
asked by 05.12.2017 / 23:22
1
answer

Error with RawQuery in SQLite

Good friends, I made my database to do the registration of users and their login, I used separate classes for the base: public class Usuario { private int id; private String nombre; private String password; public Usuario(int...
asked by 01.12.2017 / 10:48
1
answer

How can I add a second navigation drawer?

How can I add a second navigation drawer Convert part of onCreateOptionsMenu to navigation drawer public class Inicio extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {...
asked by 30.11.2017 / 21:31