Closed ricardoalcocer closed 9 years ago
I actually started to work on a Titanium module for https://github.com/ManuelPeinado/FadingActionBar some months ago but didn't finished it. I think the biggest challenge is that we would need to provide an extended TiUIScrollView, TiUITableView and TiUIListView to bound the fading animation to the onScrollListener. I'll have another look at this soon.
I think it's also a challenge to make this at creation time of the window because you can not just wait until the window is open to access the Actionbar. This might be possible together with the new theme property in 3.3.1 as we need to apply the TranslucentActionBar Theme before the Activity starts. I'm not sure how the API for this should look like.
@ricardoalcocer I had a look again and you'll be happy to hear that you can already do this in Titanium.
To get this working you need to set the Actionbar into overlay mode by theme:
<item name="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item>
The rest is simply changing the actionbar background color while scrolling. I'll provide an example soon.
Allright, here is my example gist: https://gist.github.com/manumaticx/c173974097c36d08eedc
It looks like this:
Oh man, I'm gonna blow up twitter with this!!
:)
R
On Wed, Jun 24, 2015 at 9:04 AM, Manuel Lehner notifications@github.com wrote:
Allright, here is my example gist: https://gist.github.com/manumaticx/c173974097c36d08eedc
It looks like this: [image: fadingactionbar] https://cloud.githubusercontent.com/assets/2563642/8335031/612c4996-1a9b-11e5-855d-fddb0dee7b42.gif
— Reply to this email directly or view it on GitHub https://github.com/ricardoalcocer/actionbarextras/issues/16#issuecomment-114926054 .
Check out my mobile app development book at http://buildmobileapps.io
Ha! Just tweeted it :P I am actually surprised how simple this was. Hacked together in 20 minutes. It uses just abx.backgroundColor, its not a new feature.
Just shared it internally as well.
Speaking of Android, I'm writing something about using the Material Theme. Would love to hear your comments and/or corrections if any: https://gist.github.com/ricardoalcocer/790ffb935c298391d189
R
On Wed, Jun 24, 2015 at 9:17 AM, Manuel Lehner notifications@github.com wrote:
Ha! Just tweeted it :P I am actually surprised how simple this was. Hacked together in 20 minutes. It uses just abx.backgroundColor, its not a new feature.
— Reply to this email directly or view it on GitHub https://github.com/ricardoalcocer/actionbarextras/issues/16#issuecomment-114929859 .
Check out my mobile app development book at http://buildmobileapps.io
@manumaticx this is awesome, thank you! do you know if this would work with
@android:style/Theme.Material
That example appears to be using the Material Theme (compiled with Ti 4.0), though Appcelerator doesn't inherits from Theme.Material, but rather from AppCompat.
@ardiwine Yes, as @ricardoalcocer said, I use 4.0 and this is already Material with AppCompat theme. The theme is included in the gist. I've not yet tested on other Android versions but this should also work on Android 2.x
@manumaticx I have try your module update about this material theme on Android using ScrollView and it work perfectly. Could this be implemented in ListView or TableView, because I've tried using ListView with event 'swipe' it doesn't worked.
@danang-altastratus Not sure how this could work with ListView but you can use this however you want. I just came up with an example of how this basically works - feel free to modify and improve it.
Found this and thought it would be nice to add to this module:
http://cyrilmottier.com/2013/05/24/pushing-the-actionbar-to-the-next-level/
@manumaticx, do you see any serious technical challenges with this?