Questions tagged as 'java'

3
answers

Generate button board by code in Android Studio

I'm working on an android application and I need to create a board (made of buttons). I already generated the board from the code of my java class, but the problem is that the buttons go out of sight (they leave the screen). I have already tr...
asked by 08.09.2016 / 21:08
5
answers

How to find a string within a list

In this code, what I need is to compare the movie string to the attribute of all the objects in the Movie class, and if it finds it returning a Boolean, but somehow it does not, can you help me and see what is wrong? . Thanks public clas...
asked by 26.05.2017 / 20:37
1
answer

Kill a thread on Android onBackPressed ()

I am trying to kill this thread as soon as I press the back button. But in "HiloConsumo" it does not pick up the reference of the thread new Thread("HiloConsumo") { public void run() { while (true) {...
asked by 17.05.2017 / 21:51
1
answer

Problem when scanning Wi-Fi networks on Android

I'm trying to scan the available WiFi networks. I just need a list with their SSID, but the application stops when it reaches this.wifilist = this.wifiManager.getScanResults(); I would appreciate if you throw me a little hand, I'm quite n...
asked by 17.05.2017 / 20:05
1
answer

Error getting names with apostrophes when using regex java android

I have a problem with this regex code to get text strings with apostrophes obtained through streaming. The code I use is this: public static Map<String, String> parseMetadata(String metaString) { Map<String, String> metadata =...
asked by 20.05.2017 / 03:23
2
answers

Scrolling through listview scroll delete edittext data

Good morning afternoons I have a listview that I fill with a custom adapter in which I have an edittext so that the user can put a quantity, the problem is when I have more than 5 rows in my listview and enter in the first one, and I scrol...
asked by 16.06.2016 / 21:39
2
answers

Get "unixtime" unix time in Java (Android)

The function time () in PHP is the number of seconds since the Unix Era (1 January 1970 00:00:00 GMT). Example: 1465491771 In java how can you get the equivalent value to Unix Time?     
asked by 09.06.2016 / 19:06
1
answer

Error: Execution failed for task ': app: mergeDebugResources'

This error came up all of a sudden, it marks me the class R in red in the Java code. AAPT err (Facade for 557143976): libpng error: Not a PNG file    Error: Execution failed for task ': app: mergeDebugResources'.   Some file crunching fai...
asked by 25.05.2016 / 20:25
1
answer

how can I import Jeremy Feinstein's slidingmenu library in android studio?

I need to add Jeremy Feinstein's slidingmenu library that I downloaded from github in the android studio and I do not know how since it's a tablet I do not know how to add that kind of libraries. Greetings     
asked by 26.05.2016 / 06:35
1
answer

POST request error with JSON with accents in Android

I am sending a request to an API in ASP.NET from Android, I am using Spring Framework to make requests, the problem is that when sending a JSON that contains accented characters the server returns an exception with the following message: {"exc...
asked by 02.02.2017 / 07:16