Questions tagged as 'android'

1
answer

Check and change the first 3 characters of a string?

For example, a string with telephone +5531984892883. I would like to check if the first 3 characters are equal to +55. If they are equal to +55, replace them with 0 (zero). How can I do this?     
asked by 27.06.2017 / 18:49
1
answer

Return string in a query in SQLITE

I need to return a user's name in an SQLITE query: I'm using the following code: public String verificarUsuario(String login) { try { String selectQuery = "select nome from usuarios where login = " + login;...
asked by 26.06.2017 / 20:44
2
answers

Get news from a site automatically

I'm creating an application and it will have the news part, how do I get it automatically from the posts on this site? as in the following application that I found on the internet.  He takes the picture of the post the title and a preview of the...
asked by 28.06.2017 / 20:06
1
answer

How to add a button in Action Bar?

I would like to just put a button on the'Action Bar '. follows a sample image from the internet.     
asked by 12.04.2017 / 15:46
1
answer

Problem in calculator in android studio

I'm a beginner and I'm developing a simple calculator in android studio, but it only shows the result of two values, eg 1 + 1 = 2. I would like to do several operations at the same time, eg 1 + 2 * 3/4. Follow the code import android.support.v...
asked by 04.04.2017 / 20:21
1
answer

"What eh" / "how to solve" a "null object reference" error? What appears on the console?

When I try to use the code below (which alias I got with the help of OS friends) I get an error on the line:
asked by 31.01.2017 / 00:50
3
answers

Formatting dates for display and storage

In this Android application, I have a date field in the SQLITE database table, defined as: String createTable = "CREATE TABLE " + TABLE_RUNS + " ( " + _ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COL_RUN_DATE + "...
asked by 26.01.2017 / 03:10
1
answer

What is the error in DEBUG: java.net.socketExeption "socket Closed"?

Yesterday my study APP was running smoothly, I finished, I made BKP and went home ... Today I opened and went straight to check everything ... but without more or less, I received this error in the debug console ..... Unable to open debug...
asked by 26.01.2017 / 02:00
2
answers

How do the back button of the actionBar function? [closed]

I'm not getting it to work. pv help me. My manifest looks like this: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.alinesilvagonzaga.testedostrespontin...
asked by 12.12.2016 / 01:30
2
answers

How to associate a variable with an ID?

I have an array integer and I need to associate this value with a certain button, to change its backgound. if there is a "40" in the array, I need the "40" button to change color. and so on until the entire array is checked. Basically, what I ne...
asked by 02.12.2016 / 11:20