Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7500387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:09:56+00:00 2026-05-29T20:09:56+00:00

Im just asking you a simple question to you experts because i just started

  • 0

Im just asking you a simple question to you experts because i just started studying android basics.

I tried to create a table view and display some strings in it.

i write the xml like this but im getting some warnings “I18N] Hardcoded string “Open…”, should use @string
resource”
when a string is declared.

<TableRow>
    <TextView
        android:layout_column="1"
        android:text="hello"
        android:padding="3dip" />
    <TextView
        android:text="helloo"
        android:gravity="right"
        android:padding="3dip" />
</TableRow>

<TableRow>
    <TextView
        android:layout_column="1"
        android:text="how"
        android:padding="3dip" />
    <TextView
        android:text="Ctrl-Shift-S"
        android:gravity="right"
        android:padding="3dip" />
</TableRow>

<View
    android:layout_height="2dip"
    android:background="#FF909090" />

<TableRow>
    <TextView
        android:text="are"
        android:padding="3dip" />
    <TextView
        android:text="you"
        android:padding="3dip" />
</TableRow>

Can you please help me please.Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:09:58+00:00Added an answer on May 29, 2026 at 8:09 pm

    Strings should go to the res/values/strings.xml file which could look like this:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <string name="hello">Hello World!</string>
        <string name="app_name">My App</string>
        <string name="ctrl-shift-s">Ctrl-Shift-S</string>
    </resources>
    

    Applications can be localized easily: In Eclipse, right-click the res folder, select Android XML Values File, click next. Enter strings.xml, click next. Now you can add various options like language or network code.

    Android resource localization

    Now you can reference your strings using @string/ctrl-shift-s.

    <TableRow>
        <TextView
            android:layout_column="1"
            android:text="how"
            android:padding="3dip" />
        <TextView
            android:id="@+id/textview-command"
            android:text="@string/ctrl-shift-s"
            android:gravity="right"
            android:padding="3dip" />
    </TableRow>
    

    Or, within Java code, R.string.ctrl-shift-s.

    The @+id/xyz creates an ID so you can get the view from code.

    All resources are being added to the R class automatically.

    TextView textView = (TextView) findViewById(R.id.textview-command);
    if (textView != null)
        textView.setText(R.string.ctrl-shift-s);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started to study the android so im asking such a simple question.
Asking a simple question, just want everyone have fun to solve it. I got
I am just asking a quick simple question here. I'm trying to code poker
I hope this question is not 'controversial' - I'm just basically asking - has
I'm perhaps being a bit lazy asking this here, but I'm just getting started
I have just tried to save a simple *.rtf file with some websites and
The question is preatty simple. Is there a way to display two separate web
I feel kind of silly asking this question as it seems really simple, but
I'm not sure if I'm even asking this question correctly. I just built my
Pretty simple question. Its just some advice based on personal opinion and best practice.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.