Questions tagged as 'android'

2
answers

Cursor positioning problem

LogCat is experiencing a problem with NullPointerException , but I can not identify it. In my point of view, that's right. I know that there is a problem in lines 34 and 39 of ContactRegister that lead to condition if(moveToFirst...
asked by 24.03.2014 / 15:47
1
answer

How to stop a service?

I created a VPN connection in my app through a service, at the click of a button, the connection is made. But now I want to know how to do the reverse, ie by clicking the disable this connection button. How can I do this? Procedure to call th...
asked by 23.11.2018 / 22:21
1
answer

Enable smartphone GPS

I'm developing an app that uses geolocation functions. The same is already taking the locations of the smartphone, and I can check if the connection of the GPS or not. So far, what I'm not getting is that if the GPS is turned off, ask the user t...
asked by 08.04.2015 / 13:59
3
answers

How to implement the ActionBar fixed below, android version 2.x or higher?

I'm implementing Action Bar in android version 2.x or higher, however, I'm having difficulty with how the elements are displayed. In version 2.x the bar appears below, only without the names of the menus, and in version 3.0 or higher the action...
asked by 14.02.2014 / 17:02
3
answers

How to make a simple square on Android?

Can you make a square full of color without all the complications? I say complications, because the examples I see here on the internet require that I create another class, inheriting from the View, doing drawRect() in the onDraw()...
asked by 11.02.2014 / 05:18
1
answer

How to apply an undistorted texture?

I have a texture like this, which I will apply in many different shapes and sizes, in addition to table background and table rows. How do you apply it in multiple sizes without distorting? Is it possible? NOTE: I used ninepatch but because...
asked by 09.02.2014 / 03:19
1
answer

Debug SharedPreferences on Android

Is there any easy way to see everything I have inside my SharedPreferences ? Something like: SharedPreferences prefs = this.getSharedPreferences( "user_access", Context.MODE_PRIVATE); Log.i("SharedPreferences", prefs); Update With...
asked by 18.11.2014 / 17:47
1
answer

How do I apply a currency mask in my listView? [duplicate]

I'd like to know how to implement my monetary mask on ListView of products. I ask that you be the most specific and detailed because I do not have much experience. Thank you. public class ProdutoAdapter extends BaseAdapter {...
asked by 18.01.2016 / 20:39
1
answer

Button with transparent background

I'm creating button in my application so final Button btCategoria = (Button) LayoutInflater.from(this).inflate(R.layout.button, null); btCategoria.setId((int) listenerCategoria.id); btCategoria.setText(listenerCategoria.nome+"(...
asked by 09.02.2015 / 22:08
1
answer

What is ActionBarSherlock for Android?

A former colleague used this framework / lib I do not know in a company project for Android and restricted the version for Android 4.0+, however we need it to run on Android version 2.3 + ... so I do not see option if it does not remove this bus...
asked by 23.01.2015 / 22:47