• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to add overbar?

  • Thread starter Thread starter Deleted User
  • Start date Start date
D

Deleted User

Guest
I clicked app/games so I hope my question ends in the right section. If not, please move it to another section.

My scenario is as follows: I've gone through the internet after writing a roman app. I checked how to add an overbar (vinculum) and cannot find it. I found other ways how to add unicode characters but it doesn't properly meet my needs. Attached is a screenshot from an app showing exactly what my goal is. How may I display the overbar nicely and make it look well done? I don't want to sound unpleasant or discourteous but my expectations / hope is the codes should fit perfectly into the latest android studio desktop app downloaded from the android development website. I would be really happy if anyone could help.

Note: I've studied the course and tried my own so that the app already can run on both the smartphone and my tablet. As my phone is already spoilt, I expect the code is still usable on my tablet although I haven't tried it for some time.
 

Attachments

  • roman number app.jpg
    roman number app.jpg
    14.1 KB · Views: 191
1. define a string which includes the unicode char for 10K
<string name="label_roman_numeral">Roman numeral for 10K: \u2182</string>

2. show this string in a TextView
<TextView
android:id="@+id/title_test"
android:text="@String/label_roman_numeral"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</TextView>
 
1. define a string which includes the unicode char for 10K
<string name="label_roman_numeral">Roman numeral for 10K: \u2182</string>

2. show this string in a TextView
<TextView
android:id="@+id/title_test"
android:text="@String/label_roman_numeral"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</TextView>
Is this something you tried, found on internet or just some code that MIGHT work? I did find something on the internet which looks like the unicode you gave and it looks like it might work. I'm working on another project now and I'll try this later when I have the time. Thanks for the suggestion. However, I prefer text editor rather than text view.
 
Is this something you tried, found on internet or just some code that MIGHT work? I did find something on the internet which looks like the unicode you gave and it looks like it might work. I'm working on another project now and I'll try this later when I have the time. Thanks for the suggestion. However, I prefer text editor rather than text view.
This is the code I tried in my app project in Android Studio.
 
This is the code I tried in my app project in Android Studio.
Hi. Thank you.

I will try this out as I'm currently on some online tutorial that might take some time to finish. I wish to ask this out of curiosity : Any chance of a screenshot? I just want to know what it looks like.
 
I'm back. Is there an easier way to get this done? Is there some other programming language plugin I can use so I can do this in an easier way? I prefer ONE symbol code instead of inserting an entire textview screenshot.
 
Back
Top Bottom