Why is the MDToolvar icon not showing on Android?(Kivy) - android

I am building a kivy based Android app. At the moment when I run the app on Linux the MDToolbar shows the menu icon without a problem. But when I build the app for Android with menu icon dosent show up. The lambda function works even if the icon is not presented.
Here is an image that shows the problem.
This is the kv code.
MDToolbar:
id: mainToolbar
title: "APP name"
left_action_items: [['menu', lambda x: navDrawer.set_state("open")]]
Any ideas why is this happening?

I've been able to fix this by upgrading Kivy to version 2.0.0.

Related

React Native switches local files in Android bundle

I am facing an issue with local images in a React Native app. I have a file where I require all of my app icons, something like this:
export const icons = {
a: require("a.png"),
b: require("b.png"),
c: require("c.png")
};
Then I use these files in the React Native Image component. For instance:
import { icons } from "icons";
<Image
source={icons.a}
/>
It works fine in dev mode on both iOS and Android. It also works fine on iOS archive in production. But in Android production bundle, the icons seem to be randomly switched up. Sometimes icon a is displayed instead of icon b, sometimes it is icon c that is displayed instead of icon a, and so on... Sometimes one of the icon is not even displayed at all.
Can the problem come from requiring all the files in the same file ?
I would appreciate any clue. Thanks a lot.

"_Problem loading widget" in release version only

I've a really weird behavior with the App widget:
I've a home screen widget with a ListView showing data from internet.
It's working fine with no problem at all on the debug version,
but when I install release:
when I drag the widget to the home screen it shows "problem loading widget" and in the Logcat:
E/ResourcesManager: failed to add asset path /data/app/com.askelp.askelp-u7QWKA4gT6KmeGou17fWHw==/base.apk
E/RemoteViews: Package name com.askelp.askelp not found
BUT if I left it in the home screen and reinstalled the app it works then, and if I removed the widget from the home screen and reinstalled it again and dragged it again to the home screen it shows the same error and "problem loading widget"
Anyone has any idea?
EDIT:
I tried now to run it on my phone it's working, so it's working on my phone but not working in the emulator!
Solution1 :
Have you try to invalidate cache/restart?
Solution 2:
From the Documentation Link , You can only use this as widgets
A RemoteViews object (and, consequently, an App Widget) can support the following layout classes:
*FrameLayout
*LinearLayout
*RelativeLayout
*GridLayout
And the following widget classes:
*AnalogClock
*Button
*Chronometer
*ImageButton
*ImageView
*ProgressBar
*TextView
*ViewFlipper
*ListView
*GridView
*StackView
*AdapterViewFlipper

Tab Icons not showing on Android

I've been struggling to make tab icons show up on an actual Android device in a tab based application. It looks like icons cannot be found and all I can see is the tab text. Everything shows up fine though when running the app on the Android emulator. Has anybody had a similar problem and can give some valuable input? This issue happens only in actual Android devices, iOS works fine.
Dependencies used:
react-native : 0.49.5
react-native-navigation : 1.1.270
Code:
Navigation.startTabBasedApp({
tabs: [
{
label: 'Booking',
screen: 'LocationsForm',
icon : require('./src/assets/imgs/tabs/booking.png'),
title: 'Booking'
},
{
label: 'Account',
screen: 'AuthSplash',
icon : require('./src/assets/imgs/tabs/user.png'),
title: 'Account'
},
{
label: 'More',
screen: 'Extras',
icon : require('./src/assets/imgs/tabs/more.png'),
title: 'More'
}
]
});
UPDATE
For people that have the same problem. I could not find a way to make it work on an actual Android device when I was installing the debug.apk. The problem seems to solve itself though when you install the release.apk. So, all you have to do is assemble the production release of your app, install it, and you should be able to see the tab icons appearing fine on your Android device.

Titanium Appcelerator Android - Open default soft keyboard in number view

I have an address search field in my app. When this field gets focus I want to open the keyboard as in the following image.
It works fine for iOS when the keyboard type is set to Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION as in the following code
var search = Titanium.UI.createSearchBar({
barColor:'#c8c8c8',
autocorrect:true,
hintText:'enter address',
height:'43dp',
top:'75dp',
autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_WORDS,
keyboardType:Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION
});
However on Android it appears as in the following image.
I am using Titanium mobile SDK 1.7.5
You should probably add :
softKeyboardOnFocus : Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS
Unfortunately, it may be overridden by the system. Try it on another Android system (3.0 for example) if the problem persist.

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