Questions tagged [charsequence]

In Java (and related languages such as Scala), java.lang.CharSequence is an interface to sequences of character values.

For more information, see the Java 8 specification of CharSequence.

146 questions
0
votes
3 answers

CharSequence Restarts After Orientation Change

I have a CharSequence which displays a sequence of text after each imageview click however the CharSequence seems to restart if the orientation is changed mid sequence. Does anyone know how this can be resolved?
OhNoItsAnOverflow
  • 237
  • 2
  • 5
  • 13
0
votes
2 answers

android how can i format a arrayList

i have a problem with format arrayList.I have one parameter it have value Licence_car:[[คย1453 กรุงเทพมหานคร], [รง2344 กรุงเทพมหานคร], [รน4679 กรุงเทพมหานคร]] (Data is a ThaiLanguage) I use this parameter to set entry of list preference but it will…
0
votes
2 answers

Problems with putExtra and putStringArrayList

I'm trying to send some data from one activity to another and it's sorta working but not like I want to work. Problem 1-Things are getting mixed up. On the Next Activity part of the listitem is going to an incorrect textView and part to the correct…
SmulianJulian
  • 801
  • 11
  • 33
0
votes
1 answer

ArrayList to charsequence conversion issue when selecting an option

I populate an alerttdialog from a database. I store these values in an arrayList, convert them to an charsequence list then set them to my alertdialog builder. As shown: This is a screenshot of my populated 'text template' options from my…
user1352057
  • 3,162
  • 9
  • 51
  • 117
0
votes
1 answer

C++ char sequence function always return empty string

Just start learning C++ and trying to make a simple function that do substring with following code: char* substring(int start, int end, const char* target) { size_t length = strlen(target); char result[(length + 1)]; int iterator =…
yunhasnawa
  • 815
  • 1
  • 14
  • 30
0
votes
2 answers

how to get string to charsequence

i want to get data from my table on myDB and i want to show the data to alertdialog, here's my code : public void gotResult(String result, String message) { // TODO Auto-generated method stub if (result != null) { switch…
Richardo Luis
  • 37
  • 1
  • 2
  • 13
0
votes
2 answers

dynamically populating data in charsequence

I have a charsequence in which I want to populate data dynamically. when I am hard coding the values its working fine, otherwise not This one is working private void getDir(String dirPath){ File f = new File(dirPath); File[] files =…
-1
votes
1 answer

How can I replace a char sequence to "\n"

I want to replace the string "pqtd" to "\n", and my code is: String str = "this is my pqtd string"; if (str.contains("pqtd")) { str.replaceAll("pqtd", "\n"); } But that doesn't go, if I change all the code, doing it in reverse (trying to…
-1
votes
1 answer

How to find the maximum number of same chars in a row inside an array in C#

(Tried to look for earlier answers for my question and didn't find any...) lets say I have an array like this : string[] chars = {"1", "x", "1", "x", "x", "x", "x", "x", "1", "1", "1", "x", "1", "x", "x", "x"}; I need to find the way to extract the…
Yuvi1
  • 9
  • 7
-1
votes
1 answer

application crash on dialog alert click

I have created an alert dialog in fragment. It shows when user click on item view and when someone click on alert dialog option , it crashes application. Problem occurs just when perform an action to firebase but action completed successfully . I…
-1
votes
2 answers

Attempt to invoke virtual method on a null object reference when taking values from another class

I have a "game" with two classes, one that holds and manages the layouts and views and another one that should perform all of the calculations needed. Did not get very far because when I click a TextView instead of displaying a value, the app…
-1
votes
2 answers

How to use CharSequence

Hey i'm having some trouble understanding CharSequence. I think this will be the perfect method to help with my hw but im having trouble understanding how to use it. How do i make the sequence < /p> comes up. This is what i have so far: String s…
John
  • 1
  • 1
  • 2
-1
votes
1 answer

Android CharSequence[] Array Doesn't work

I've got some Error about that.This Dialog shows nothing.What's wrong? ArrayList WikiOnBellek = new ArrayList(); WikiOnBellek.add("One"); WikiOnBellek.add("Two"); …
Kadir Susuz
  • 127
  • 1
  • 1
  • 8
-1
votes
1 answer

Misbehaving replace(CharSequence, CharSequence) in java.lang.String

This snippet prints ?! String str = ""; str = str.replace(new StringBuilder('Z'), new StringBuilder("?!")); System.out.println(str); // prints ?! How come? (I'm running JSE RTE 1.8.0_66 with HotSpot x64 VM (25.66-b18) on Win7)
Igor Soudakevitch
  • 671
  • 10
  • 19
-1
votes
1 answer

CharSequence defining multiple words?

CharSequence listOfWords = ("word"); the code above successfully defines listOfWords as: "word" But I need listOfWorlds to have lots of words in it, not just the single "word". CharSequence listOfWords = ("word")("secondword"); above code is what…
1 2 3
9
10