FokkeZB / nl.fokkezb.loading

The widget provides a simple loading mask that can be easily styled and configured.
93 stars 18 forks source link

This doesn't show up in Android. #15

Closed junerockwell closed 10 years ago

junerockwell commented 10 years ago

Hi. This widget is great and works perfectly in iOS. But it doesn't show up in Android at all. Could you tell me why?

Currently using Titanium SDK 3.4RC and my HTC One is running Android KitKat.

Thanks.

FokkeZB commented 10 years ago
junerockwell commented 10 years ago

My current version of Alloy is 1.5.0-rc3. I'm using Titanium SDK 3.4RC. The phone I'm using is an HTC One running Android 4.4.2. I haven't check it using an older version of Alloy.

FokkeZB commented 10 years ago

Could you try Alloy 1.4 and compare the compiler widgets for me?

junerockwell commented 10 years ago

Unfortunately, I can't because I have to keep working on this project and I'm using some of the features from Alloy 1.5.0-rc3.

FokkeZB commented 10 years ago

Do you have a small test case for me that reproduces the error for you? Then I can track it down for you.

ardiwine commented 10 years ago

I have the same issue. It's not showing on Android.

Tested on Android 4.3 / Ti 3.4.GA / Alloy 1.5 & Alloy 1.4.

I set my target android sdk as

<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="17"/>

Based on your doc, I also added

<activity android:configChanges="keyboardHidden|orientation"
              android:name="org.appcelerator.titanium.TiTranslucentActivity"
              android:screenOrientation="portrait"    
              android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar"/>
mcvendrell commented 10 years ago

Hi all.

Since Ti 3.4.0 (really since 3.3.1 but has no GA version) you can use this option instead (I tried it in emulator with 2.3.3 and works).

  1. Remove from tiapp.xml:

    <activity android:configChanges="keyboardHidden|orientation" android:name="org.appcelerator.titanium.TiTranslucentActivity" android:screenOrientation="portrait" android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar"/>

  2. Now add a custom theme, as explained in the same article recommended by Fokke http://www.appcelerator.com/blog/2014/08/hiding-the-android-actionbar/

    `<?xml version="1.0" encoding="utf-8"?>

    `
  3. Finally, change the theme in the window.xml file of Fokke's widget:

    <Window id="loadingMask" class="loadingMask" onClick="cancel" onFocus="onFocus" onBlur="onBlur" theme="Theme.NoActionBar">

In this way, only the widget will be affected by the theme, and you can use other "translucent" windows of your own with the action bar.

FokkeZB commented 10 years ago

I've updated 1.7 to use Theme.AppCompat.Translucent.NoTitleBar. No need to add a custom theme.

Also, by default it now uses the ProgressIndicator ;)

mcvendrell commented 10 years ago

Very good point, better and easier. Thank you!!!