Android - Character Encoding with Ant Release - android

In my app I write out a list of hard coded string values, from the class in a List as below:
getSalePricesMin().put(40000, "£40,000"); getSalePricesMin().put(60000, "£60,000");
getSalePricesMin().put(80000, "£80,000"); getSalePricesMin().put(100000, "£100,000");
getSalePricesMin().put(120000, "£120,000"); getSalePricesMin().put(180000, "£180,000");
They are displayed In a standard spinner.
When I build the App using Eclipse, the '£' symbols display correctly, however, I need to release using ant, and when I do this I get the bad encoding as shown below.
I have tried adding java.encoding=UTF-8 to the ant.properties file, but this does not change.
Any advise? Thanks guys

Ok,
Replacing £ symbols for \u00a3 worked a treat.
getSalePricesMin().put(40000, "\u00a340,000");
getSalePricesMin().put(60000, "\u00a360,000");
getSalePricesMin().put(80000, "\u00a380,000");
getSalePricesMin().put(100000, "\u00a3100,000");
getSalePricesMin().put(120000, "\u00a3120,000");

Related

KivyMD, can't see icons in android but works on linux

I'm just created .apk file with buildozer.But as i said in topic, can't see any icon on device.Everything works and looks fine in Linux. But in device,all icons are blank. This is my buildozer.init requirements: (my ndk,sdk,minapi,ndk_api values are default)
requirements = python3,kivy==1.11.1,https://github.com/kivymd/KivyMD/archive/master.zip
If i use kivymd==0.104.1, i can see icons in android but can't use some commands like : MDTab.get_tab_list() , MDTab.switch_tab() (I asked that problem before in here.So i have to use master branch version because i need to switch MDTabs after some button clicks.But now,i can't see any icon.Is that bug or can someone help me ? Thank you..
(Last note: Im removing .buildozer file before change requirements versions.)
Set correct dependencies in buildozer.spec- https://github.com/kivymd/KivyMD/commit/df73810cc725e4575c93bc4cbbb72f67ff568dc1

btsnooz.py not parsing android BT log

I'm trying to follow the instructions found here:
https://inneka.com/programming/android/bluetooth-hci-snoop-log-not-generated/
and here:
https://source.android.com/devices/bluetooth/verifying_debugging#debugging-with-bug-reports
I am able to get the log, run the python code to parse it and and it runs successfully (on my Mac) however when I open the file it looks like a bunch of gibberish. Which I'll paste below. Is there a special log viewer I need to open this up with? I might be doing something dumb, anyone run into this? Thanks!
‚xcƒc7f3‚xcƒc8]‚xcƒc< Ö  C‚xcƒc<˘ 
‚xcƒc#l
˘¸Ù∂§‚xcƒcAæGG‚xcƒcFDˇˇˇÃˇÔˇˇˇ¸Ú˲?˜èˇa˜ˇˇ¯ˇˇˇˇˇˇ¿‚xcƒcFÈ‚xcƒcJ∫ø˛œ˛€ˇ{á‚xcƒcKëV‚xcƒc‚SV‚xcƒc‰®m‚xcƒcÈ!m‚xcƒcÍL‚xcƒcÓn‚xcƒcÔç‚xcƒcÛè3‚xcƒcÙnz‚xcƒc˘>z‚xcƒc˙p ‚xcƒc˛Y Ä‚xcƒcˇY
‚xcƒdÍ ˚‚xcƒd‹ ‚xcƒd‡ ˇˇˇˇˇ‚xcƒd ‚ ‚xcƒd
* Ô‚xcƒd
* ‚xcƒd©* Ä‚xcƒdu/ ‚xcƒdÕ/ ˚H˚H‚xcƒd®# ‚xcƒd¡# H‚xcƒdÇ ‚xcƒd£ ‚xcƒdfˇˇˇˇˇˇø=‚xcƒd!â‚xcƒd"S‚xcƒd%ù‚xcƒd)À) ‚xcƒd.) ‚xcƒd.î. Ñ‚xcƒd2k. ‚xcƒd3.E‚xcƒd=èE‚xcƒd=ˆG‚xcƒdBøG‚xcƒdC-C‚xcƒdGC‚xcƒdGp$```
The comment at the top of the btsnooz.py script explains how to open the generated file:
This script extracts btsnooz content from bugreports and generates a
valid btsnoop log file which can be viewed using standard tools like
Wireshark.
Wireshark can be obtained from here.

Android Bootstrap not displaying icons in button

I implemented Android Bootstrap library:
https://github.com/Bearded-Hen/Android-Bootstrap
Everything works fine, but icons in buttons are not displayed.
I add font-awesome file into asset folder, but still without successful result.
How can be this solved?
Thanks for any help.
Try what it worked for me, make sure that "android-support-v4.jar" file in libs folder (assuming that you're working in eclipse) is the same copy in AndroidBootstrap library project and your project.
This might only partially solve your problem, you might have problems with the icon not displaying when you change orientation (landscape/portrait) and there might be better solution, but this is my quick fix:
in OnResume add:
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){
bbYourButton1.setLeftIcon("fa-heart");
bbYourButton2.setRightIcon("fa-twitter");
}
If there is a problem loading the font, you should get the reason in the log cat, as we can see in com / beardedhen / androidbootstrap / BootstrapButton.java at line 343
Log.e("BootstrapButton", "Could not get typeface because " + e.getMessage());
So, go to the logcat and see if you can understand what happened.
Anyways, the better start point is to import the AndroidBootstrapTest project and see if everything works.
Just copy fontawesome-webfont.ttf into assets folder of your project.

Phonegap Android - Helvetica/Arial font

I have an application in Android - I am using Phonegap - where I have to use "Arial" or "Helvetica" font. Everything is fine but 'g' looks like 'g' in Times new Roman:
http://pl.wikipedia.org/wiki/Times_New_Roman
and I want to have Helvetica/Arial 'g' look:
http://pl.wikipedia.org/wiki/Helvetica
I checked on several phones/Android versions. None can read Helvetica/Arial 'g' look normal :(
I also tried to import TTF manually and adding it to project but it wasn't working either :(
Any help here?
P.S. sorry for English

getting Eclipse to see recently added Drawables (png artwork)

I'm having trouble getting Eclipse to see that I've just put a new image into my project when referencing that image using R.drawable.this_text
So I drag my png into myProject/res/drawable-hdpi in Eclipse's Project Explorer. The name of the image is this_text and it's a png!
So I go into my application and I want to put this on the screen; So here's the code for that...
private void setTitle()
{
ImageView title = new ImageView(this); //this extends activity
title.setBackgroundResource(R.drawable.this_text);
...
}
This I have done before and each time I do it I experience the same thing:
if i just dragged my this_text.png into the Project Explorer in eclipse, the word "this_text" will be underlined in red, and not allow me to compile or proceed. I try to F5 (refresh) the project. I try refreshing the image foldr, the src, the actual java...etc! I try closing and opening eclipse but nothing really works. So I quit for afew minutes and work elsewhere in my application, and eventually this error goes away!
Well I'm impatient today-- And I'd rather know how to solve this incase I need to do any quick programming! So does anyone know what to do?
I'm using eclipse Version: Indigo Service Release 1.
Thanks- Ethan
R files for android are generated. Rather than refreshing you should be able to CLEAN the project which should fix your issue. You could even just delete the error from the problems list which would allow for compilation to start and for the generated R file to be created. Or you could make a change to an xml which would also allow for the file to be regened. As always make sure you are up to date on your tool chain.

Categories

Resources