flavienlaurent / notboringactionbar Goto Github PK
View Code? Open in Web Editor NEWNews Stand app makes the ActionBar not boring!
News Stand app makes the ActionBar not boring!
Which part of the code do i edit if i want the view to animate to the extreme right?
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
having trouble with the integration. kindly help.
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!
Is viewpager implementation going to be implemented, so that it will be a closer mockup to the current NewsStand? Or leaving it into one activity is preferred so that PR related to viewpager implementation won't be entertained?
How to achieve addHeaderView feature on recyclerview?
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.
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.
I have got GridViews fully working and also ScrollViews.
I was thinking there's probably more people like me who would like to use GridViews or ScrollViews.
If I send you the code will you help me improve it?
There are a few very small issues with the ScrollView version.
It is fully working its just if you scroll slowly or if you keep your finger on the screen it shakes a bit sometimes. Its probably something very small with the ratio / interpolation stuff I didnt do right. Would really appreciate it if you could look at it.
Hi, Thanks for awesome job, it works great on my nexus 5, but when testing on 4s device with android 4 its animation for photo is too slow and I have to wait for animation to finish to scroll on list and that's slow too, any idea?
Brun
Sometimes the image moves too far and I can also see its edge with blank background behind it.
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
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();
}
});
when user scroll listview the main logo(center icon) and its background image should go on action bar with a little floating.
Hi there, how can set moving images from URL instead of drawable folder?
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.
find android.R.id.home and return null?
I have Sherlock Fragment class in which I want to implement NotBoringActionbar. Can you please help how can I integrate ?
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.
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.
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.
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??
I want to scroll the ListView by touch header.
Any advice?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.