FORUMS

Android 5.1 for the Nvidia Shield Tablet is Out!

Nvidia is quite good at delivering updates in a timely fashion. The producer of famous … more

Other than XDA (of Course), What’s Your Favorite Site That Covers Android?

There is a number of other great sites that cover … more

Introducing Voices of XDA: Have Your Ideas Heard

By far the greatest assets we have at XDA-Developers are you, the developers, the eager … more

Unofficial Xposed For Lollipop Touchwiz With Flashable Zip

XDA Recognized Developer arter97 has released an unofficial build … more
Post Reply Subscribe to Thread Email Thread

[LIB] Header2ActionBar | 06.12.2013

6th December 2013, 08:50 PM |#1  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,752
 
Donate to Me
More
Hey there,



Header2ActionBar is a library which implements the fading action bar effect that can be seen in the new Play Music and Google Newspaper apps.



Download the sample app

Usage:

Using the library is really simple, just look at the source code of the provided samples. I'll post more samples soon.

License:
Code:
    Copyright (C) 2013 AChep@xda <artemchep@gmail.com>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
Source code:
To get a copy of the source code, visit my repo at GitHub.
There no pre-compiled JAR yet.

Thanks:
Thanks to the TeamFun channel at freenode! You guys yawns as always :P

Have fun with Header2ActionBar and don't forget to yawn and to contribute your own code!
Last edited by AChep; 6th December 2013 at 08:57 PM.
The Following 30 Users Say Thank You to AChep For This Useful Post: [ View ]
 
 
9th December 2013, 01:06 PM |#2  
yogi.306's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 230
 
More
Question Thanks for the project
Quote:
Originally Posted by AChep

Hey there,



Have fun with Header2ActionBar and don't forget to yawn and to contribute your own code!


Thanks for your efforts and project, wanted to know is it possible to use this with FragmentActivity ?
i mean my current project supports android 3.0 + and i am extending my activity from FragmentActivity to have left drawer.
and i see that i can have action bar in 2.0 + using your project,
but than i found that activity is extended from header2ActionBar
9th December 2013, 01:12 PM |#3  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,752
 
Donate to Me
More
Quote:
Originally Posted by yogi.306

Thanks for your efforts and project, wanted to know is it possible to use this with FragmentActivity ?
i mean my current project supports android 3.0 + and i am extending my activity from FragmentActivity to have left drawer.
and i see that i can have action bar in 2.0 + using your project,
but than i found that activity is extended from header2ActionBar

You can make the Navigation Drawer inside of the Activity too. If you doesn't want to do it - use HeaderFragment and copy-paste code from the FadingActionBarActivity.
Last edited by AChep; 9th December 2013 at 02:40 PM.
9th December 2013, 03:57 PM |#4  
ATMOSF3AR's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 653
 
Donate to Me
More
thanks for your efforts, really nice.
9th December 2013, 04:25 PM |#5  
Member
Thanks Meter: 1
 
More
I tried the sample app. It seems that it really lags on an HTC one Google edition with stock kitkat 4.4

Sent from my HTC One using XDA Premium 4 mobile app
9th December 2013, 06:40 PM |#6  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,752
 
Donate to Me
More
Quote:
Originally Posted by solidd_swa

I tried the sample app. It seems that it really lags on an HTC one Google edition with stock kitkat 4.4

Sent from my HTC One using XDA Premium 4 mobile app

Hmmm... Probably that's because of the "floating height" enabled. But, anyway, strange that HTC lags on it. I'll try to do something with that.

PS: Does it lag when the header is invisible too?
Last edited by AChep; 9th December 2013 at 06:43 PM.
9th December 2013, 07:23 PM |#7  
David 617's Avatar
Senior Member
Thanks Meter: 259
 
More
Looks beautiful. I really like this. It is perfect for a project I'm working on.
Thank you

PS. Demo app is smooth and works well

Sent from my Galaxy Nexus using Tapatalk
9th December 2013, 08:32 PM |#8  
David 617's Avatar
Senior Member
Thanks Meter: 259
 
More
Also, question. I assume that this won't interfere with a search function in the action bar, correct? (My goal is to have a search similar to the gmail app)

Sent from my Galaxy Nexus using Tapatalk
9th December 2013, 08:59 PM |#9  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,752
 
Donate to Me
More
Quote:
Originally Posted by David 617

Also, question. I assume that this won't interfere with a search function in the action bar, correct? (My goal is to have a search similar to the gmail app)

Sent from my Galaxy Nexus using Tapatalk

Yeah. It should work fine.
The Following User Says Thank You to AChep For This Useful Post: [ View ]
10th December 2013, 04:08 PM |#10  
DaGr81's Avatar
Member
Flag Kathmandu
Thanks Meter: 21
 
More
nice work.
Post Reply Subscribe to Thread

Tags
achep, android, header2actionbar, lib, library, opensource
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes