Questions tagged [getstring]
150 questions
1
vote
2 answers
Get text from string with kotlin in android studio
I have a kotlin module with code like this.
class AppOpenManager(private val appLanding: AppLanding) :
Application.ActivityLifecycleCallbacks, LifecycleObserver{
//.........OTHER CODE
companion object {
private const val…

M.Fahri
- 345
- 3
- 11
1
vote
0 answers
Connecting to MySQL from C++, getString() doesn't work correctly
#include
#include
#include
#include
/*
Include directly the different
headers from cppconn/ and mysql_driver.h + mysql_util.h
(and mysql_connection.h). This will reduce your build time!
*/
#include…

qwe123
- 19
- 1
1
vote
1 answer
How do I get getString in fragment?
How do I get getString in fragment, I have tried to solve it with snippets of code on this but it did not work to tap
chronology
-ok so in the uploaded image there are some 6 items in the recyclerview that line up the grid, I try to make it to the…

hashtag
- 83
- 2
- 8
1
vote
1 answer
Send Email - Keep Cell Formatting
I have a google spreadsheet that sends student information contained in a column that is queried and concatenated from another sheet. The queried information is separated by carriage returns. This column is then emailed to families triggered by a…

Michael Brush
- 13
- 2
1
vote
1 answer
NoneType error with get_string in python
I am currently using sublime text 3. I am trying to prompt the user for a string, check the string length and store that string, however I run into "NoneType error" when I try it. It currently looks like this.
from cs50 import get_string
while…

pnuk23
- 11
- 3
1
vote
1 answer
How to retrieve a string array from a cursor
I have a cursor, called passableCursor, containing multiple fields, However one field,ingredients, holds multiple values and I'm unable to get all the values from it.
Example of retrieving from name
Log.d("recipeName",…

Mcseth Antwi
- 41
- 7
1
vote
2 answers
Android getString issue
So I have many strings in strings.xml, they are recorded in a format of:
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
......
Now I want to load them one by one…

Yuze Tang
- 15
- 4
1
vote
4 answers
Change Resource getString() programmatically
Is there any way to change a R.string programmatically? Because it's throwing an error.
Basically I want to do this:
String parkAdd = getString(R.string.stg_ParkAddress_+id);
Because I have hardcoded strings that are changed according ID.
I tried to…

FilipeOS
- 801
- 1
- 11
- 42
1
vote
0 answers
result.getString("xxx") lot of times SLOW
I'm using a resultSet to transfer a table from one DB to the other.
But when getting the result from some rows it is too slow.
Here is the code:
ResultSet result = stmt.getResultSet();
while (result.next()) {
…

Guilherme
- 21
- 5
1
vote
2 answers
Getting NULL value from strings.xml resource
I am trying to get a string to display from the strings.xml
opmStatusText is showing the correct Value from Strings.xml (Android Studio is displaying the value) but when I use it in txt = "Operational Status: " + opmStatusText; it is showing as…

Sobo
- 487
- 8
- 21
1
vote
1 answer
savedInstanceState.getString() only available for API 21 warning?
So I'm overriding onRestoreInstanceState() to restore data when the screen is flipped over, and inside I'm calling getString() to set the text of an instance of EditText:
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
…
user4492811
1
vote
3 answers
How to set a bold Text by using getString()
I want to show a BOLD text by setText() , but i just saw a text is not BOLD :( How can I solve this problem ?
Here my code :
String.xml :
AMERICA-default
my Java code :
Resources resources;
TextView…

Cuong Truong Huy
- 61
- 6
1
vote
3 answers
How to get text out of Website into String
How can I get Text out of an URL from a website into a TextView or a String in Android/Java.
I want to get this Text
"I want to get this Text" into a String:
String…
thankyou
- 211
- 1
- 5
- 13
1
vote
3 answers
how to pass extra intent to two activities
i have an app that on the first activity asks the persons name on the second page it displays the name in a sentence i want to use the name in the third fourth or 9th activity how do i properly declare it (public?) and call it when and where ever i…

martinseal1987
- 1,862
- 8
- 44
- 77
1
vote
2 answers
Why am I getting getString error? And how to resolve?
I am testing out the FragmentPagerAdapter and I had it all in a single class before. And everything worked, but once I separated SectionsPagerAdapter class, the getString doesn't work under the getPageTitle function.
I know getPageTitle is part of…

The Nomad
- 7,155
- 14
- 65
- 100