Questions tagged as 'android'

1
answer

Icon color - Android Toolbar

How do I leave the color of the icon in API's smaller than 21, also white? At 21 it works ok, but below as for example 16, it turns black. I did it this way: Toolbar <android.support.v7.widget.Toolbar android:id="@+id/t...
asked by 22.03.2016 / 17:45
2
answers

Recognize whether the user is using iOS or Android

I'm developing a screen for a website, and the customer asks if there's a chance the site will recognize whether the user is using Android or iOS. If you're on Android, go to Google Play to download the app and if it's iOS for the App Store....
asked by 29.08.2014 / 14:36
1
answer

How to make ScrollView scrolling always visible

I have a horizontalScrollView and I was just wanting to let the scroll bar always show. <HorizontalScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:lay...
asked by 22.12.2014 / 13:26
1
answer

Error rounding BigDecimal

I'm doing a calculation with two methods, but since the attributes are of type double , I'm using BigDecimal to perform the operation and after that convert to two decimal places only. I'm having difficulty converting, I've tried...
asked by 17.11.2015 / 03:49
1
answer

How do I save an image in the database in SQLite?

How do I save an image in SQLite? I ask to be as specific as possible because I do not have much experience. In case I want to include a table row to save the image. import br.gestaoBd.Login; public class EstruturaBanco { public static...
asked by 11.01.2016 / 04:38
2
answers

How to center a TextView?

How to center the horizontal text in TextView , ie center in the top and bottom line. <TextView android:id="@+id/txt" android:layout_width="match_parent" android:layout_height="match_parent" and...
asked by 31.01.2016 / 12:57
2
answers

What error is this? "Could not find method schedule (View) in"

I'm calling a method, when I click the button and this error appears, but I do not know what it means:    java.lang.IllegalStateException: Could not find method (View) in a parent or ancestor Context for android: onClick attribute defined on...
asked by 05.09.2017 / 20:54
2
answers

Where to save API connection credentials on Android

I wanted to know a suitable place to save the api connection (link, username and password), initially I was thinking of saving in an xml, but I believe that any user will have access to this file, being able to open and read. Is there a safer wa...
asked by 01.04.2017 / 07:24
2
answers

How do I create a Library-Android using Android Studio?

I have some projects under development and I have several classes in common for these projects. I would like to know how to create and use a Class Lib so that I can reuse them whenever I need them without having to re-write these classes.     
asked by 01.11.2016 / 20:07
1
answer

Convert a String ArrayList to a Json

I need to convert a ArrayList of String to a JSON. I have a method where I get a list of apps installed on the mobile device. This method returns the data in a String ArrayList. I was able to generate a JSON using JSONArra...
asked by 26.01.2016 / 21:22