News Stand app makes the ActionBar not boring!

Overview

No boring ActionBar

http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/

An explaination on how to implement the edition screen of the Newsstand app.

  • ActionBar effect
  • Ken Burns animation

Example Image

License

Copyright 2013 Flavien Laurent

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.
Comments
  • NotBoringActionBar with webview

    NotBoringActionBar with webview

    Hi Flavien,

    Thanks for sharing your code. I try to use it with a webview but facing a problem. There is no header view in a webview ;) I tried to add a padding but padding does not work on webviews. I tried to play with margins but i need to requestLayout and it's a bit laggy.

    Any idea ? Thanks

    opened by jeromevdl 4
  • Tiny bug + How to set the header images to scroll using

    Tiny bug + How to set the header images to scroll using "parallex" effect?

    I would like to ask how should I make the images on the header to scroll together with the listView, so that both the bottom and the top of the view will get truncated, and not just the top (as the normal scrolling does).

    for example, if the image is: 11 22 33 44 55 then when you scroll, I'd like to get: 22 33 44 instead of: 33 44 55

    I've tried to use ParallaxImageView instead of simple ImageViews , but it didn't help.

    Also, I've found a tiny bug: you've created a function called "clamp" but its parameters don't match the operations being done there. the minimal value is 1 instead of 0, and the maximal value is 0 instead of 1 : code before:

    public static float clamp(float value, float max, float min) {
        return Math.max(Math.min(value, min), max);
        }
    

    code that should be: public static float clamp(final float value, final float min, final float max) { return Math.min(Math.max(value, min), max); }

    I've also changed the order of the parameter, since it's more common to put the min value before the max value.

    opened by AndroidDeveloperLB 4
  • clamp function is wrong

    clamp function is wrong

    you have to pick the maximum value between "min" and the minimum between "max" and "value"

    refer here: http://stackoverflow.com/a/16659144/2008214

    opened by carlonzo 3
  • Battery drainage? Pausing animation.

    Battery drainage? Pausing animation.

    Hi!

    I must say this is an excellent library. There is however one issue, I notice that even though the screen is turned off, the image-swapping still occurs. I was wondering how one could pause the animations without accessing the pause() / resume() animation that were newly added in a recent-ish API? (if I remember correctly? sorry for being so vague, rookie android-dev here :-) )

    I tried calling the onAttachWindow() and onDetachWindow() in the main-activity through onResume() and onPause() respectively, by making the classes public instead of protected in your KenBurnsView.java, but alas... no success.

    enhancement 
    opened by sp00ne 2
  • ListView setOnItemClickListener not Responding to click

    ListView setOnItemClickListener not Responding to click

    in NoBoringActionBarActivity.Java

    mListView.setOnItemClickListener(new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                Toast.makeText(getApplicationContext(), "position" + position,
                        1000).show();
    
            }
        });
    
    opened by kazaky 2
  • Support for more than 2 image swaps

    Support for more than 2 image swaps

    Hi,

    As for now the library can swap 2 images. I wanna add support for more than 2 images because I wanna show lots of images. I tried adding it myself but then too it shows only 2 images from the list of tons of images. I guess this is due to array of image views

    opened by AkshayChordiya 1
  • How to stop the image moving

    How to stop the image moving

    Hi,

    Thanks for this excellent library. I liked this library very much & I have made it much better but now I wanna stop the image from moving but I don't wanna stop from changing the image automatically.

    opened by AkshayChordiya 1
  • Changing the header image dynamically

    Changing the header image dynamically

    Hi

    Thanks for this excellent library. Is there any provision in this library to change the header image dynamically ? For now I've to provide the image ids before only.

    Thanks in advance.

    opened by AkshayChordiya 1
  • Clamp method is wrong

    Clamp method is wrong

    • the order of the parameters "max" and "min" is inverted (based on how they are used)
    • the method is wrong. it doesn't set the right bounds

    ps: sorry its very stupid, but I wanted to fix it!

    opened by carlonzo 0
  • Appcompat + NineOldAndroids

    Appcompat + NineOldAndroids

    Hi, I was able to migrate this lib to appcompat and use nineoldandroids to make the needed changes in the scale/transalations animanations, could you add support to it in the original project?

    I could open a pull request, but I use eclipse and my code formatting is very different from yours. Anyway, checkout my NotBoringActionBar fork is you want to see what I did. Thanks for this great work!

    opened by BugsBunnyBR 0
  • Issue with kenBurnsView when running on Kitkat devices

    Issue with kenBurnsView when running on Kitkat devices

    I took only the kenBurnsView from this project and i implemented it in mine, I this logcat when running it on kitkat devices (on other devices it work perfectly):

     D/KenBurnsView? swapImage active=-1
     D/KenBurnsView? starting Ken Burns animation android.view.ViewPropertyAnimator@5284ef64
     I/Choreographer? Skipped 47 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 63 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 60 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 59 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 51 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 57 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 63 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 62 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 60 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 62 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 56 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 54 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 62 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 62 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 49 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 69 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 57 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 46 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 62 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 76 frames!  The application may be doing too much work on its main thread.
     D/KenBurnsView? swapImage active=1
     D/KenBurnsView? new active=0
     D/KenBurnsView? starting Ken Burns animation android.view.ViewPropertyAnimator@54e2e858
     I/Choreographer? Skipped 66 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 31 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 34 frames!  The application may be doing too much work on its main thread.
     I/Choreographer? Skipped 30 frames!  The application may be doing too much work on its main thread.
     D/dalvikvm? GC_FOR_ALLOC freed 76K, 1% free 88450K/88652K, paused 3ms, total 3ms
     D/dalvikvm? GC_FOR_ALLOC freed 35K, 1% free 95824K/96060K, paused 2ms, total 2ms
     I/Choreographer? Skipped 34 frames!  The application may be doing too much work on its main thread.
    
    opened by iballan 1
  • The value in getScrollY() method

    The value in getScrollY() method

    hi sir, I've read your blog and code , and it's great. But I got a little problem still bothering me.

    public int getScrollY() { View c = mListView.getChildAt(0); if (c == null) { return 0; }

    int firstVisiblePosition = mListView.getFirstVisiblePosition();
    int top = c.getTop();
    
    int headerHeight = 0;
    if (firstVisiblePosition >= 1) {
      headerHeight = mPlaceHolderView.getHeight();
    }
    return -top + firstVisiblePosition * c.getHeight() + headerHeight;
    

    }

    I tried to remove the "firstVisiblePosition * c.getHeight()" and it still work well. So I am still confused about the meaning of this statement.

    opened by machinezhou 1
  • How to use ActionBarActivity??

    How to use ActionBarActivity??

    Thanks for sharing your code. I try to use it with a ActionBarActivity instead of Activity
    (NonBoringActivity extends ActionBarActivity) and findViewById(android.R.id.home ) is null findViewById(android.support.v7.appcompat.R.id.home) is null

    do you have any idea??

    opened by kyominoh 2
Owner
Flavien Laurent
Flavien Laurent
An example of how to extend the ActionBar under the status bar from the theme

Extended ActionBar The problem: Android 4.4 Kitkat introduced a wonderful new opportunity: translucent bars. It's as simple as adding the following to

Eugenio Marletti 160 Nov 11, 2022
Android library implementing a fading effect for the action bar, similar to the one found in the Play Music app

FadingActionBar FadingActionBar is a library which implements the cool fading action bar effect that can be seen in the new Play Music app. This libra

Manuel Peinado Gallego 2.9k Nov 21, 2022
Navigation pattern like in Google News Stand app with transitions

Google-NewsStand-Animation-Android Navigation pattern like in Google News Stand app with transitions Getting Started In your build.gradle dependencies

Hariprasanth S 129 Nov 11, 2022
A news application through which you can learn and browse all the news that interests you by choosing the country and type of news with the ability to browse and add some news to your favorites

MY-NEWS-Android A news application through which you can learn and browse all the news that interests you by choosing the country and type of news wit

Mahmoud ELramady 0 Nov 11, 2021
News-App - A news app Which displays news with the help of JSON data

News-App This is a news app Which displays news with the help of JSON data

Lalith Sharma 0 Feb 16, 2022
A news app made using android studio in Java with features like favourite news, Location detector for local news, and especially made with HUAWEI APIs

HuaweiGlobalNewsApp A news app made using android studio in Java with features like favourite news, Location detector for local news, and especially m

Christian Imanuel Hadiwidjaja 1 Oct 30, 2021
Android News App built in kotlin with implementation of MVVM architecture, android navigation components and retrofit. Displays news to users allowing them to share and save news.

News-App Android news app built in kotlin that fetches news data from news api with Retrofit and displays news to users. This App follow MVVM architec

Raj Manjrekar 16 Dec 29, 2022
A News Application Shows Breaking News of the Country with a feature to save News for future Use.

A News Application Shows Breaking News of the Country with a feature to save News for future Use.You can search news on any topic.Used all latest stuffs in android like Navigation Component, MVVM Architecture, Retrofit, Room DataBase, Kotlin Corutines etc

Aman Bhatt 2 Oct 20, 2022
An application for conducting an experiment on the energy consumption of the screen on a test stand

energy-consumption-screen-test-app An application for conducting an experiment on the energy consumption of the screen on a test stand The Application

Motika Artem 0 Dec 10, 2021
An Android Library to help you create actionbar tabs like "Capitaine train" app by Cyril Mottier

TabBarView An Android Library to help you create actionbar tabs like "Capitaine train" app by Cyril Mottier Implementation: Declare TabBarView and set

Mirko Dimartino 510 Nov 15, 2022
An example of how to extend the ActionBar under the status bar from the theme

Extended ActionBar The problem: Android 4.4 Kitkat introduced a wonderful new opportunity: translucent bars. It's as simple as adding the following to

Eugenio Marletti 160 Nov 11, 2022
This library offers a simple method to add a small badge icon to your ActionBar-MenuItem

Android-ActionItemBadge ActionItemBadge is a library which offers a simple and easy to use method to add a badge to your action item! Screenshots Incl

Mike Penz 1.3k Jan 1, 2023
You don’t want your apps look and feel boring, do you? Add some bubbles!

#BubbleAnimationLayout Say hello to Bubble Animation Layout for Android by Cleveroad You don’t want your apps look and feel boring, do you? Add some b

Cleveroad 576 Nov 23, 2022
🛠️ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files.

DrawableToolbox English | 中文 The missing DrawableToolbox for Android. Create drawables programmatically and get rid of the boring and always repeated

Hong Duan 1.1k Jan 4, 2023
You don’t want your apps look and feel boring, do you? Add some bubbles!

#BubbleAnimationLayout Say hello to Bubble Animation Layout for Android by Cleveroad You don’t want your apps look and feel boring, do you? Add some b

Cleveroad 576 Nov 23, 2022
Boring trading log to track yearly profits and current portfolio.

Boring trading log to track yearly profits and current portfolio. May be useful for tax reports. It should be able to import Coinbase and Binance repo

Marco Bortolan 1 Nov 21, 2021
Don't know what to do next? Don't worry, NEG or NotEnoughGoals will give you some help by giving you some goals to achieve to make skyblock less boring.

NotEnoughGoals Don't know what to do next? Don't worry, NEG or NotEnoughGoals will give you some help by giving you some goals to achieve to make skyb

UpFault 0 Dec 26, 2021
[Development stopped in 2014. Unfinished and not stable - not recommended to use.] An easy-to-use ViewPager subclass with parallax background effect for Android apps.

Development stopped in 2014 Not developed since 2014. Unfinished and not stable - not recommended to use. ParallaxViewPager An easy-to-use ViewPager s

Andras Kindler 437 Dec 29, 2022
Newesy is news app which uses NewsAPI to fetch news.

Newesy is news app which uses NewsAPI to fetch news.The main aim of this app was to learn Modern Android Architecture (MVVM).It uses MVVM,Kotlin-coroutines,Room,ViewModal,Retrofit,GSON and Navigation graph

SHANTANU RATHOD 7 Oct 29, 2022
The News App has been carried out within the framework of the MVVM architecture, information about news is obtained by consulting an API, it is built usisng Jetpack Copose, Coroutines, Dependency Injection with Hilt and Retrofit

Journalist The News App consists of an application that displays the latest news from EEUU from an API that provides official and updated information.

null 0 Nov 3, 2021