Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-3 votes
1 answer
55 views

I am trying to save a string to a MYSQL table from a radiobutton in java/Android studio [closed]

I am trying to save a radiobutton string if it clicked. I am making a survey where I need to save a "yes" or "no" into a MYSQL table using volley. I am having a little trouble ...
Connor Daly's user avatar
2 votes
1 answer
90 views

Code for adding a user to the database

I have a code that adds a user to the database, getting the username from the dialog.My fragment implements the interface with the onInputSend method, which is called by the dialog when the user ...
Destroyer's user avatar
  • 459
3 votes
3 answers
164 views

Java regex and replaceAll to extract strings into objects

I have this method that creates book objects. I pass a list of strings (size 60000+) that contain the information of the book, the function then goes and extracts the information makes the book object ...
Rob's user avatar
  • 63
11 votes
1 answer
2k views

Determine differences between two Strings, for use in undo/redo feature

I made a library that adds undo/redo functionality to EditText widgets in Android. It came from problem I had building text-editing apps that deal with large (1,...
PPartisan's user avatar
  • 213
5 votes
2 answers
25k views

Extracting a sentence containing a specific word from a longer text

My goal is to return a specific sentence in a story that contains a given word. Returns null if the word is not in the story. I'm ok with returning the first ...
Scott's user avatar
  • 245
7 votes
1 answer
4k views

Fully-working alternative to String.format(...)

PLEASE NOTE: The code below has "commented out" code; however, no code is actually commented out!! Check my GitHub link below. I did that solely to highlight the relevant code sections. Code in my ...
Christopher Rucinski's user avatar
16 votes
4 answers
28k views

Integer seconds to formated string mm:ss

I have a String like "Time left (XX)" or "You need stay here for (XX)" and int as second. I use those two variables to format ...
Błażej's user avatar
  • 589
27 votes
3 answers
32k views

Reusing StringBuilder or creating a new one? [closed]

Given that it is better to reuse objects than create new ones when developing with Android, is it worth while deleting the contents of a StringBuilder and reusing ...
Christopher's user avatar
13 votes
5 answers
20k views

Remove useless whitespace from styled string

I have a big string resource (basically the "about" text of the application) which contains styles (such as <b>, <a> ...
Felix's user avatar
  • 283