Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[LIB] Header2ActionBar | 06.12.2013

OP AChep

6th December 2013, 09:50 PM   |  #1  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,660
 
1,270 posts
Join Date:Joined: Feb 2011
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 09:57 PM.
The Following 30 Users Say Thank You to AChep For This Useful Post: [ View ]
9th December 2013, 02:06 PM   |  #2  
yogi.306's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 182
 
577 posts
Join Date:Joined: Mar 2013
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, 02:12 PM   |  #3  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,660
 
1,270 posts
Join Date:Joined: Feb 2011
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 03:40 PM.
9th December 2013, 04:57 PM   |  #4  
ATMOSF3AR's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 647
 
581 posts
Join Date:Joined: Jan 2012
Donate to Me
More
thanks for your efforts, really nice.
9th December 2013, 05:25 PM   |  #5  
Member
Thanks Meter: 1
 
81 posts
Join Date:Joined: Nov 2008
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, 07:40 PM   |  #6  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,660
 
1,270 posts
Join Date:Joined: Feb 2011
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 07:43 PM.
9th December 2013, 08:23 PM   |  #7  
David 617's Avatar
Senior Member
Thanks Meter: 246
 
590 posts
Join Date:Joined: May 2011
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, 09:32 PM   |  #8  
David 617's Avatar
Senior Member
Thanks Meter: 246
 
590 posts
Join Date:Joined: May 2011
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, 09:59 PM   |  #9  
AChep's Avatar
OP Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,660
 
1,270 posts
Join Date:Joined: Feb 2011
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, 05:08 PM   |  #10  
DaGr81's Avatar
Member
Flag Kathmandu
Thanks Meter: 21
 
71 posts
Join Date:Joined: Aug 2010
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