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

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

Related

JavaFxPorts TextField Issue - Android Keyboard wont function

I developed a simple javafx application to be ported in Android Environment, however I cant type any characters in the TextField. I guess its a bug, how to fix this one?
Th problem on galaxy S5 android 5.0.1 is not present but on galaxy tab 4 android 5.0.2 it doesn't work i type but none is displyed.
Tried with normal textfield. And the problem persist also I have added the properties .
Another strange rhig is that the space where recognizer. And the del button . The text not
THe code by example is very easy
Rectangle2D visualBounds = Screen.getPrimary().getVisualBounds();
double width = visualBounds.getWidth();
double height = visualBounds.getHeight();
TextField tt= new TextField();
tt.setTranslateY(-150);
StackPane stackPane = new StackPane();
stackPane.getChildren().addAll(tt);
borderpane.setCenter(stackPane);
Scene scene = new Scene(borderpane, width, height);
stage.setScene(scene);
Assuming that CustomTextField is just a custom TextField, this is a known issue, not related to the CustomTextField itself, given that it works in other device.
If you debug it:
./adb logcat -v threadtime
you surely find an exception that explains the issue: a StackOverFlow exception.
On older devices it can be solved adding this: create a java.custom.properties file, and include in it this property:
monocle.stackSize=128000
You may also include this one:
monocle.platform=Android
(it will be soon included by default in the next version)
Put the file at the root of your classpath, e.g. in the folder src/android/resources of your project.
Build and deploy the project on your mobile and check again.

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.

Android icon wrong in App Management app, but correct in Launcher

I have a simple Android app (built with Mono for Android), which has a problem with it's icon.
The icon is correct in Launcher and in Task Switcher, but
In Manage Apps and in Task Manager it's displayed a generic Android icon
I've checked the various density resources and the manifest and they all look correct.
(I'm seeing this on a Galaxy S phone and on a Nexus 7)
Most likely you set the icon property for your activities within AndroidManifest.xml, but did not set it for the application.
It occurs to me, that the app icon is somehow being cached in the app manager, so that deinstalling and reinstalling the app does not always change the icon properly. Rebooting the device could help.
Also i found this post very useful: adding application ids in gradle usually solves the problem.
Open "AndroidMenifest.xml" in the Package Explorer and click on the "Application" tab at the bottom. Look at the "icon" field and enter the location for your icon ( Ex: #drawable/iconimage). Next, go into the "AndroidManifest.xml" tab and look for android:icon=, adding the location to that as well (Ex: android:icon="#drawable/iconimage)
Make sure you have the same icon name in both locations!
Oleg and Collin are both right but for completeness - in a Mono app the icon can be set with attributes on the Application object (if you have one):
[Application(Label = "MyAppName", Icon = "#drawable/icon")]
class MyApp: Application
{ ...

Android - Character Encoding with Ant Release

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");

image won't show in tableView

I'm creating a tableView in appcelerator (Android) and I want to add an image to it. This is just a test because I also had some problems with it in my project and I wanted to try it out first somewhere else so I wouldn't ruin my whole project.
I first added the standard png's to see if he would show those, and he did. But when I add a png that I've created, he refuses to show it in the tableView. Does someone know why he refuses to show the image? (I created that png in photoshop by changing one of the standard png's and adding my image to it.)
var win = Titanium.UI.createWindow({
title:'tableViewRow',
backgroundColor:'#fff'
});
var regData = [
{leftImage:'KS_nav_ui.png', title:'gft', left:20, color:'black'},
{rightImage:'KS_nav_views.png', title:'grofvuil', left:20, color:'black'},
{leftImage:'glas.png', title:'glas', left:20, color:'black'}
];
var tbl = Titanium.UI.createTableView({
data:regData
});
win.add(tbl);
win.open();
Here's an image of the result I get in my android emulator (android api: Google APIs Android 2.2 and screen:HVGA)
If you are using AppC 1.8, you may just need a forward slash in your path '/'. (or backward if Windows)
I've solved it. What I did is I ran the application in an android amulator. I closed the app and went back to the homescreen (where you can save some apps). I pressed on menu and went to the settings. Than I went to applications. I opened 'manage applications' and remove the application. I closed the emulator and ran it again and the images were shown.
I don't know why you have to do it, but it worked for me. I hope I can save someone the frustration by posting the answer (I know I had them :D)

Categories

Resources