Wordwrap problem in android - android

I am having a textview with multi line text. In some places textview is having webpage address like google.com yahoo.com etc.., Now because of multi line, wordwrap functionality is splitting google. in one line and com in other line, same is happening for yahoo. in one line and com in other line.
Is there any way to specify that some words in the string should not be splitted in android?
-RR..

you have to load your string as Html content. For Example, think that this your String
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. <a>http://www.google.co.in</a> The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
you have to put <a> tag to doesnot affect the wordwrap.
you have to load your String like this: textview.setText(Html.fromHtml(content_String));
Hope it helps.

Related

Google Play Store Description Size & Color [duplicate]

I've made an Android application that is available on Google Play. Now I want to add some more formatting to my app description (eg. indent, links, lists..). But I cannot find any website where possible formatting is listed. Google Help pages cannot help me either on this subject. There exists a lot of different formats and I don't really know which one to use (eg. HTML or wiki formatting..)
I could test it with trial and error, but that would take some time, because Google Play only refreshes after 2-3 hours. And while I'm testing, my app description would be rather ugly if the wrong format was used.
tl;dr Is there a list of all possible formatting I could use in the app description for Google Play?
Experimentally, I've discovered that you can provide:
Single line breaks are ignored; double line breaks open a new paragraph.
Single line breaks can be enforced by ending a line with two spaces (similar to Markdown).
A limited set of HTML tags (optionally nested), specifically:
<b>…</b> for boldface,
<i>…</i> for italics,
<u>…</u> for underline,
<br /> to enforce a single line break,
I could not find any way to get strikethrough working (neither HTML or Markdown style).
A fully-formatted URL such as http://google.com; this appears as a hyperlink.
(Beware that trying to use an HTML <a> tag for a custom description does not work and breaks the formatting.)
HTML character entities are supported, such as → (→), ™ (™) and ® (®); consult this W3 reference for the exhaustive list.
UTF-8 encoded characters are supported, such as é, €, £, ‘, ’, ★ and ☆.
Indentation isn't strictly possible, but using a bullet and em space character looks reasonable (•  yields "• ").
Emoji are also supported (though on the website depends on the user's OS & browser).
Special notes concerning only Google Play app:
Some HTML tags only work in the app:
<blockquote>…</blockquote> to indent a paragraph of text,
<small>…</small> for slightly smaller text,
<big>…</big> for slightly larger text,
<sup>…</sup> and <sub>…</sub> for super- and subscripts.
<font color="#a32345">…</font> for setting font colors in HEX code.
Some symbols do not appear correctly, such as ‣.
All these notes also apply to the app's "What's New" section.
Special notes concerning only Google Play website:
All HTML formatting appears as plain text in the website's "What's New" section (i.e. users will see the HTML source).
Currently (July 2015), HTML escape sequences (• •) do not work in browser version of Play Store, they're displayed as text. Though, Play Store app handles them as expected.
So, if you're after the unicode bullet point in your app/update description [that's what's got you here, most likely], just copy-paste the bullet character
•
PS You can also use unicode input combo to get the character
Linux: CtrlShiftu 2022 Enter or Space
Mac: Hold ⌥ 2022 release ⌥
Windows: Hold Alt 2022 release Alt
Mac and Windows require some setup, read on Wikipedia
PPS If you're feeling creative, here's a good link with more copypastable symbols, but don't go too crazy, nobody likes clutter in what they read.
As a matter of fact, HTML character entites also work : http://www.w3.org/TR/html4/sgml/entities.html.
It lets you insert special characters like bullets '•' (•), '™' (™), ... the HTML way.
Note that you can also (and probably should) type special characters directly in the form fields if you can enter international characters.
=> one consideration here is whether or not you care about third-party sites that collect data on your app from Google Play : some might simply take it as HTML content, others might insert it in a native application that just understand plain Unicode...
This is not bullet but you can consider it. As there is nothing like big dot.
I used below symbol in the description and its working fine.
⚫ Black Circle
🌑 New Moon
🌕 Full Moon
💠 Diamond With a Dot
🔸 Small Orange Diamond
⚙ Gear
🏴 Black Flag
🏳 White Flag
▶ Play Button
⏩ Fast-Forward Button
⭕ Heavy Large Circle
✴ Eight-Pointed Star
◼ Black Medium Square
◽ White Medium-Small Square
◾ Black Medium-Small Square
⬛ Black Large Square
You just need to copy and paste it over description. Below is the result.
Currently (June 2016) typing in the link as http://www.example.com will only produce plain text.
You can now however put in an html anchor :
My Example Site
Title, Short Description and Developer Name
HTML formatting is not supported in these fields, but you can include UTF-8 symbols and Emoji: ✓☆👍
Full Description and What’s New:
For the Long Description and What’s New Section, there is a wider variety of HTML codes you can apply to format and structure your text. However, they will look slightly different in Google Play Store app and web.
Here is a table with codes that you can use for formatting Description and What’s New fields for your app on Google Play (originally appeared on ASO Stack blog):
Also you can refer this..
https://thetool.io/2020/html-emoji-google-play
Include emojis; copy and paste them to the description:
http://getemoji.com
<br> seems to be the best and only way that currently works on the app version to create a new line break. I have tried it successfully in a review, as well as unsuccessfully tried all other Unicode/HTML newline-related characters that the Wikipedia page for newlines would tell me.
I used <br> with | immediately on either side, using no closing tag, and it magically created a single line break without revealing the source or screwing anything up.
TLDR: <br> lets you successfully utilize single line breaks in Google Play app -- unlike everything else I tried (a lot).
P.S. I have no clue how to make the thing show source instead of being used as source. !^( Now I do, and I know it works on both the desktop and mobile sites. !!
Additionally, upon searching for how to make it show the source, I stumbled upon this. <del></del>

How to convert the localisation in Android string resources files to Windows Phone 8 resources file?

I have the localised string file(s) of an internationalised Android app. Now I want to bring the string translations over to a new Windows Phone 8 ("WP8") app without having to manually copy every string individually.
I found several tools that can do iOS -> Android and/or Android -> iOS (e.g. LocalizedStrings2Android, stringsconvert, etc.), but there seems to be no tool out there that can transform the string files Android -> WP8 (or even iOS -> WP8).
Apple's iOS uses files with simple key-value pairs, Android has an XML file, and WP8 uses "XAML" that contains special binding clauses. WP8's format/content differs quite a bit from iOS's and Android's. Is that the reason no tool(s) exist?
I'd appreciate any pointers to existing tools or hints how to best approach this problem.
If you choose to downvote the question please be so kind to leave a comment.
And finally: No, web searches return nothing, unfortunately!
Microsoft Excel.
Open the Android’s strings.xml with it.
It will ask “How would you like to open?” choose “As an XML table”, it’ll message “Excel will create a schema”, press OK.
In Excel, use cut & paste to reorder the columns so the first column is "name" second is "string". You can cut and paste the compete columns by right-clicking on the headers.
Then you’ll be able to copy-paste the whole table, both names and strings, from Excel to the Visual Studio’s *.resx editor. You might have some issues if e.g. you have many names containing spaces, or with values containing newlines, but it still should be much faster then copy all your individual strings.
If you want to automate (e.g. if you have dozens of languages), the .resx format is a simple XML as well. If you know XSLT, the transformation will only take a few lines, if you don't, use any scripting language instead.

Support multiple languages at the same time?

I have seen many apps which will ask language settings when you open the app first time,it will load particular language whole time.but in my case i need to support different languages at the same time,the user can have more than 2 language songs and it should support the meta data of 4 languages(English, Korean,Japanese,Chinese) at the same time .how ever I am getting meta data from the server or local song.so I use something like that for Korean language.(in this case it won't support,Chinese)
String songnametemp = json.getString(0)//from server
String songname=`songnametemp.getBytes("iso-8859-1"), "euc-kr")`//changing to korean
TextView songtext=(TextView)findViewbyID(R.id.song);
songtext.setText(songname)
the problem is that I can't hard code for each and every language, i would not know which language(META-DATA) songs are playing from server. is there any better way to do it?
In My lollipop device it support koreans and hindi language,but my kikat does not the support both .I think each new version they are supporting more languages.
In Windows this is handled by system library called Uniscribe, on Apple systems by ATSUI, and on Linux systems by Pango. Android is based on Linux
but unfortunately Google seem to have removed the parts for handling complex scripts. (A rather strange decision since most Android devices
are for communications including text.) Complex scripts work fine on other mobile devices using a Linux based operating system like the Nokia N9 and N900
.in android There is no way to identify which language Unicode you song meta data has,if you the know language you can encode to specific language like what you did above.
Or you can give the setting in preference"to choose language " when you launch the app first time.but however if you want support all language at the same time.
You have to encode in server only ,so you can support all languages at the same time.
When I run into this issue and have control of the data stored on the server, I convert everything to Unicode, e.g. UTF-8, before storage. This way the conversion is only done once and there is no need for downstream applications to handle anything other than say UTF-8. A major benefit is your use case of displaying multiple languages together side by side which can now happen transparently.
I don`t understand well what you trying to do , but for support multi-language in android for
- static values , just use values like that "values-en" , "values-ar"
- server values , make your web services handle language
"example.com/en/getdata"
"example.com/ar/getdata"
and in your values add link as language

Convert I18n Iphone Files to Android

I have an iOS App localized (with Localizable.strings files).
I've built now an Android version. I understand the way the i18n is made on android but I would like to avoid redoing the i18n, as almost all the Strings have the same meaning between iOS and Android.
Are there any tools that will do this conversion, or at least speed up the process?
Edit:
Ideally I would like to find a method/tool that would do the following
Input:
'iOS Localizable.strings files-(en,fr,it,pt,etc)'
'res/values/strings.xml'
Output:
'res/values-en/strings.xml'
'res/values-fr/strings.xml'
'res/values-it/strings.xml'
'res/values-pt/strings.xml'
'res/values-etc/strings.xml'
There is a specialised service here: Loco.
There are threads here on SO which deal with conversation:
Are there any tools to convert an Iphone localized string file to a string resources file that can be used in Android?
Any tool to convert Android's XML localization to iPhone's .strings file?
Another possiblity would be to use an online translation service. These services accepts text not only in Android and iPhone but also in many other formats. Upload the android text and download the iPhone text. A list of available services can be found on SO, see Any collaborative tool/website to localize an Android app? Some of these services are commercial, but even these provide a 30days test period. But note that the main focus is on translation and not on conversation.
Here is some code that does that: https://github.com/wrapp/LocalizedStrings2Android
Put it in a jar and it is ready to use.
You can use this tool I created on JSFiddle:
https://jsfiddle.net/danielgindi/x9njj9gj/
[StackOverflow requires me to write some code here because of the JSFiddle link]
Just paste in your localization strings inside the correct box, and you'll get the converted version in the other boxes (Between Android, iOS, and JS).
This tries to preserve comments too.
Cheers!

android app title naming

I'm trying to upload my android app, but instead of my app name "Соновник" it shows question marks. I've stored all my string in the values/strings.xml file. Is there some naming convention or am I supposed to do something for my app title to support UTF characters?
it might be a problem with your browser (or google's side) that it is not showing title correctly, otherwise on device i believe it should be fine.

Categories

Resources