Code Monkey home page Code Monkey logo

android-viewflow's People

Contributors

chripo avatar elijahsh avatar eric-taix avatar hameno avatar iboyko avatar mshoykher avatar nfrancois avatar orac avatar pakerfeldt avatar twicecircled avatar voldemar123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-viewflow's Issues

mTouchSlop is too short. Gives problems on vertical scrolling

Hi all!

I'm palying with this excellent library. But I faced a little problem: If I have a scrollable view, the vertical scroll doesn't work very well. It stops in the middle of the process which removes the inertial feeling of the scroll.

I could get it to work better by increasing the value of mTouchSlop in 40 in the following line:

private void init() {
    mLoadedViews = new LinkedList<View>();
    mScroller = new Scroller(getContext());
    final ViewConfiguration configuration = ViewConfiguration
            .get(getContext());
    mTouchSlop = configuration.getScaledTouchSlop() + 40;  <===
    mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
}

I also noticed that if I have a listview the vertical scroll doesn't give this problem. So, I wonder why with the list view it works ok but with a scrollable view it doesn't.

Please, let me know if you need more info.

getSelectedView returns null instead of the correct view

getSelectedView checks the mCurrentAdapterIndex against the length of mLoadedViews. This will be false for positions greater than the loaded views, so it will return null.

I'm pretty sure that it should be checking mCurrentBufferIndex instead, so getSelectedView should be:

    public View getSelectedView() {
        return (mCurrentBufferIndex < mLoadedViews.size() ? mLoadedViews
                .get(mCurrentBufferIndex) : null);
    }

Sorry, I'm just getting used to github, so haven't properly contributed this.

namespace complexity

The namespace used for the widget's XML attribute seems a bit overly complex and doesn't easily allow for an example of layout code to Just Work. What's the benefit of having it be application-specific instead of something tied to the widget?

TitleFlowProvider More than 3 titles

I wonder if the program can be amended to allow an option to be set for how many titles through the setting and at the same time make it clickable. Thus, it works more like a tab........... but a fancy tab.

View not attached if convertView ignored

If the adapter ignores the convertView passed to Adapter.getView(), the child is never attached to the window by ViewFlow, which in turn might cause strange behavior.

(Re-)set an to new adapter which returns 0 for getCount()

When i'm setting viewflow adapter with 0 elements the first time it's okay that nothing happens (i can see no children of the viewflow). But when i set the viewflow to use an adapter which has children and then set the same viewflow to an adapter which doesn't have children, i can still see the data of the adapter which had children.

I tried to fix this by myself, but couldn't come up with a solution.

It would be very cool if someone could show me how i can fix this without writing super ugly workaround code (which would be my personal next step).

JavaJim85

Optimize view load order

For example we create adapter with asynchronous load data and set to initial position 10.
With default settings the order of view loading is

7 8 9 10 11 12 13

user wait wor loading first 3 views (that can take a long time) to see the selected one

may be we could change load order to this one ?

10 9 11 8 12 7 13

viewflow-example: not all buttons seen

Hi! I was curious about your library, so I tried it on my device (HTC Desire, Froyo OS) by running the viewflow-example:
on your screenshot all buttons from 0 to 9 are shown, whereas on mine only 0 to 6.
I am going to make a screenshot for you.

tilusnet

Add new viewgroup?

This may not be the correct forum for this question, but is it possible to add a new view group (a new page) upon a button click at run time? Same with removal of a page. I've been searching the code for something to add/remove view, but did not see anything. The number of view seem to be set up in code. Thanks.

CircleFlowIndicator not showing with certain width/heights

I'm having a very strange problem with the CircleFlowIndicator. I'm using ViewFlow to create a gallery of products, and using the CircleFlowIndicator to show how much products we have.

However, if I set the indicator height/width both to "wrap_contents", then the indicator is not shown in the view. If I set the width to some value, for instance, 10dp, then it shows. However, if there are 3 products, the indicator is not centered.

What is more bizarre is that if I inspect the layout using ADT's Hierarchy Viewer, when I click "Load all views" the indicator shows up and works like a charm!

Can you help me on this? My customer really wants the circle indicator, and I'm banging my head in a wall here...

Thx!

Abnormal color with ListView

Hi there,

I'm getting abnormal color changes (almost flickering) while changing the background color of my app and scrolling down a ListView.

I was also able to replicate the same behavior by adding
android:background="#5C273C"

to diff_view1.xml under the main LinearLayout field. Seems like this is a bug to me... can anyone confirm or am I doing something wrong?

Thanks.

setSelection shows wrong view if called before measure

If you call setSelection() with something other than 0 before the first measure pass has been performed, the ViewFlow will display the wrong view.

For instance, we call setSelection in our activities onCreate to take you to one of the middle items. The displayed view will be sidebuffer views to the left of the one you expect, for whatever value you have for sidebuffer.

I've been able to get it to work correctly by changing line 165 from:
scrollTo(mCurrentScreen * width, 0);
to:
mScroller.startScroll(0, 0, mCurrentScreen * width, 0, 0);

But I'm not sure exactly why that works, or why the scrollTo isn't working in the first place.

Problem snapping in ListView

I've found an issue where if the viewflow is in a ListView and the ListView starts scrolling while the viewflow is scrolling, the viewflow will be left in an intermediate state. I don't have time to commit this fix, but the gist of it is in the onTouchEvent()

case MotionEvent.ACTION_CANCEL:
snapToDestination(); //Add this line
mTouchState = TOUCH_STATE_REST;

This won't help with the ListView stealing the focus, but it will at least snap to a section.

CircleFlowIndicator

help.....When using a handler to load the server data, CircleFlowIndicator not display correctly.
private void loadPage(){
list = aj.getAdvListHttp();

Message msg = new Message();
msg.what=0;
mh.sendMessage(msg);

          }

           public boolean handleMessage(Message msg) {

viewflow.setAdapter(new BigViewAdapter(this, list));
viewflow.setFlowIndicator(viewflowindic);
findViewById(R.id.adv_load).setVisibility(View.INVISIBLE);

adv_List.setVisibility(View.INVISIBLE);
adv_List.setAdapter(new ViewAdapter(this, list));
return false;
            }

CircleFlowIndicator Always shows three small dots.

Viewflow

Is it possible to add multiple listview in a viewflow.....Kindly let me if thats possible ....

setSelection causing force closed

I have more than 10 views..
but if i were in the 1st view and do a set selection to the 10th view, it will cause a force closed.

Putting an AppBuffer > 10 will help but i can't predict how many i might have since the view is loaded dynamically.

Synchronized scroll in ListView

I use ViewFlow in my application. This application is a Tv Guide which provides programs channel by channel.
My ViewFlow contains ListView. When the user vertically scroll and go to side list, the list must have the same position :

Scroll

My principal problems was to know listVliew to set postion => I just add a getter and the syncrhonisation is manage in my actiivity.

But I think other people might be interested in this type of functionality.
So I propose this feature to easily manage and automatically synchronizing the position of the ListView

II think creating a ListViewFlow which inherits which from ViewFlow

Are you interested ?

Get previous view in ViewSwitchListener.onSwitched

I would like to see an additional parameter in ViewSwitchListener.onSwitched to get the view that's being switched from, so I can manipulate it as soon as it's not visible. I implemented it by taking a reference to the current view at the beginning of ViewFlow.setSelection and ViewFlow.postViewSwitched and passing it along to the listener, but I'm not so sure this is the correct thing to do.

Errors in viewflow code when added to a project.

I can import the viewflow project into eclipse perfectly fine, but when I add it as a library to my project I get several errors. Most of them are complaining about @OverRide lines, and Eclipse suggests I should remove them. Doing so eliminates the errors. However, there is one error that I cannot resolve...

In ViewFlow.java, I am getting an error in the OnConfigurationChanged method. It says that the method is undefined for the class AdapterView.

How can I resolve this?

TitleFlowIndicator doesn't retain indicator position when screen orientation changes

I noticed that when I have a screen rotation, TitleFlowIndicator doesn't keep the position when the screen changes.

For example, if I have a titleindicator with the configuration:

Title1 Title2(selected) Title3

and a screen orientation change occur, the new presentation is the following:

Title1 (selected) Title2 Title3

As soon as you start to fling, the state is fixed.

This is caused by the fact that when the widget is recreated because of the Activity recreation, currentScroll is set back to the default value of 0. As soon as a fling event occurs the value is corrected but before that the title is not synchronized with the view content.

The solution I got, and I don't know if it is a hack or not is to update the currentScroll as soon as the widget knows its width.

This is done in the method measureWidth.

I just added the line which updates the currentScroll value and it worked like a charm.

If you think there is a better place to update this value, please, let me know. I couldn't find any event which would be called after the measureWidth method would be called and so the getWidth() method could return another value different of 0.

private int measureWidth(int measureSpec) {
int result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);

    if (specMode != MeasureSpec.EXACTLY) {
        throw new IllegalStateException(
                "ViewFlow can only be used in EXACTLY mode.");
    }
    result = specSize;

    // Restore previous position of title indicator in case of screen orientation change.
    currentScroll = currentPosition * result;

    return result;
}

Clickable titles

Hi

As I was saying in another thread, I believe it would be a good idea to make it possible for the users to click the views' titles in order to change the current view. For example if you have "Title1 Title2(current) Title3", instead of doing a fling gesture to get to Title1 or Title2, in my opinion the user should also be able to click "Title1" and change the view.
I'm saying this from my own experience, as I tried to do this the first time I installed the viewflow example and got a bit frustated because I couldn't :)

I don't know if you'll consider to add this feature. If not, please give me a hint on how I could implement it on my own.

Thanks and keep up the good work,
Costi

TitleFlowIndicator crashes when title is too long

Hi,

I am creating my calendar's weekly view based on the viewflow-example, AsyncDataFlowExample. I'm setting the title to something else and longer, specifically "Monday, January 09 2012 to Sunday, January 15 2012"

However the app crashes and I believe it's because the title is too long. How do I increase the size of the titleFlowIndicator? Is it something I have to edit inside this XML?

<org.taptwo.android.widget.TitleFlowIndicator
android:id="@+id/viewflowindic" android:layout_height="wrap_content"
android:layout_width="fill_parent"
app:footerLineHeight="2dp"
app:customTypeface="fonts/Antic.ttf"
app:footerTriangleHeight="10dp" app:textColor="#FFFFFFFF"
app:selectedColor="#FFFFC445" app:footerColor="#FFFFC445"
app:titlePadding="10dp" app:textSize="11dp" app:selectedSize="12dp"
android:layout_marginTop="10dip" app:clipPadding="5dp">
</org.taptwo.android.widget.TitleFlowIndicator>

Or is it something I edit inside the viewflow library?

Will appreciate any advice, thank you!

Debug code:
01-09 08:40:56.535: D/AndroidRuntime(1291): Shutting down VM
01-09 08:40:56.535: W/dalvikvm(1291): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-09 08:40:56.565: E/AndroidRuntime(1291): FATAL EXCEPTION: main
01-09 08:40:56.565: E/AndroidRuntime(1291): java.lang.NullPointerException
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.graphics.Paint.native_measureText(Native Method)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.graphics.Paint.measureText(Paint.java:1037)
01-09 08:40:56.565: E/AndroidRuntime(1291): at org.taptwo.android.widget.TitleFlowIndicator.calcBounds(TitleFlowIndicator.java:308)
01-09 08:40:56.565: E/AndroidRuntime(1291): at org.taptwo.android.widget.TitleFlowIndicator.calculateAllBounds(TitleFlowIndicator.java:283)
01-09 08:40:56.565: E/AndroidRuntime(1291): at org.taptwo.android.widget.TitleFlowIndicator.onDraw(TitleFlowIndicator.java:151)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.View.draw(View.java:6740)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.drawChild(ViewGroup.java:1640)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.View.draw(View.java:6743)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.widget.FrameLayout.draw(FrameLayout.java:352)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.drawChild(ViewGroup.java:1640)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.View.draw(View.java:6743)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.widget.FrameLayout.draw(FrameLayout.java:352)
01-09 08:40:56.565: E/AndroidRuntime(1291): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1842)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewRoot.draw(ViewRoot.java:1407)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewRoot.performTraversals(ViewRoot.java:1163)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.os.Handler.dispatchMessage(Handler.java:99)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.os.Looper.loop(Looper.java:123)
01-09 08:40:56.565: E/AndroidRuntime(1291): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-09 08:40:56.565: E/AndroidRuntime(1291): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 08:40:56.565: E/AndroidRuntime(1291): at java.lang.reflect.Method.invoke(Method.java:521)
01-09 08:40:56.565: E/AndroidRuntime(1291): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-09 08:40:56.565: E/AndroidRuntime(1291): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-09 08:40:56.565: E/AndroidRuntime(1291): at dalvik.system.NativeStart.main(Native Method)

Rotation

good job.

But I have found a litte issue.
When the screen is on page 4 and the user rotates the sceen, a wrong page is shown

Timing of onViewSwitched

I have an interesting issue.

My app has an image gallery that uses ViewFlow to swipe between images. Each image has some comments associated with it. There's a "view comments" button, which hides the ViewFlow and shows a comments layout.

I use the view switch listener to indicate that the comments should update to the comments for the next image.

However, a user can be 95% of the way to a new image, and let go of the touch, and though ViewFlow knows to snap to the next screen, it doesn't call onViewSwitched until it gets all the way there.

This means a user of my app can swipe to a new image, and ViewFlow will acknowledge the swipe gesture by starting to snap to the next screen, and while snapping, if the user press the "view comments" button, they get the comments for the old image. Furthermore, because ViewFlow is hidden when the button is pressed, the callback doesn't actually happen until after they hide the comments again!

We should probably either a) add a new method to the listener for onSnap or b) reconsider the timing of onViewSwitched calls.

page frozen after setSelection() is called

Hi

I'm using the Viewflow app for one of our customers. It all seems to work fine until I set the selected page with the setSelection() method in the ViewFlow class. The pages (child views of the ViewFlow view) seem to be frozen, Android stops drawing layout updates for them.

In my case, the pages contain list views. I can still scroll them but the layout updates are not drawn anymore. If you then switch to the next page and then go back, the page is redrawn (but is still frozen).

It sometimes also appears on first startup, any idea what could go wrong?

Thanks in advance!
Cliff

request: pinch/zoom images

I'd like to pinch/zoom the current image (or the whole current image container layout).
Where would you recommend adjusting viewflow?

TitleFlowIndicator footerLine calculation issue

Hi!

I found an issue in footerLine vert coordinate calculation (TitleFlowIndicator.java onDraw() function).
The following code doesn't work properly if the line thickness is more than 1 pixel:
path.moveTo(0, getHeight()-footerLineHeight);
path.lineTo(getWidth(), getHeight()-footerLineHeight);

To fix this I suggest to do the following:
int coordY = getHeight()-1;
coordY -= (footerLineHeight%2 == 1) ? footerLineHeight/2 : footerLineHeight/2-1;
path.moveTo(0, coordY);
path.lineTo(getWidth(), coordY);

Does not handle getItemViewType

When recycling views, android-viewflow does not take itemViewType into account. This might lead to the adapter get an unexpected type of convertView (in the getView call).

Fragments support?

Hi!

Do you have a sample of using viewflow with fragments support?

Sorry for using the issue system for that question, but I couldn't find a better place to ask.

Compatibility with gallery

Hi
I have a gallery in the views for which I would like to use ViewFlow. Unfortunately the fling event over the gallery are intercepted by the ViewFlow. is there any way to avoid that?
Thierry

Ability to center the circles in their CircleFlowIndicator

I wrote this small code to do this, and wanted to share. I don't know how to use GitHub yet, so I'll juste paste the patch that was generated from my project. I hope it's OK!

Regards

Index: res/values/attrs.xml

--- res/values/attrs.xml (revision 9)
+++ res/values/attrs.xml (working copy)
@@ -22,5 +22,6 @@


  •    <attr name="centered" format="boolean" />
    
    Index: src/org/taptwo/android/widget/CircleFlowIndicator.java =================================================================== --- src/org/taptwo/android/widget/CircleFlowIndicator.java (revision 9) +++ src/org/taptwo/android/widget/CircleFlowIndicator.java (working copy) @@ -29,6 +29,7 @@ private ViewFlow viewFlow; private int currentScroll = 0; private int flowWidth = 0;
  • private boolean isCentered = false;

/**

  • Default constructor
    @@ -59,6 +60,8 @@
    // Retrieve the radius
    radius = a.getInt(R.styleable.CircleFlowIndicator_radius, 4);
    initColors(fillColor, strokeColor);

  •   // Retrieve the centered parameter
    
  •   isCentered = a.getBoolean(R.styleable.CircleFlowIndicator_centered, false);
    

    }

    private void initColors(int fillColor, int strokeColor) {
    @@ -80,9 +83,18 @@
    if (viewFlow != null) {
    count = viewFlow.getViewsCount();
    }

  •   float offset;
    
  •   if (isCentered) {
    
  •       offset = getWidth() - 3_radius_count;
    
  •       offset = Math.max(0, offset/2);
    
  •   } else {
    
  •       offset = getPaddingLeft();
    
  •   }
    
  • // Draw stroked circles
    for (int iLoop = 0; iLoop < count; iLoop++) {
    
  •       canvas.drawCircle(getPaddingLeft() + radius
    
  •       canvas.drawCircle(offset + radius
                + (iLoop \* (2 \* radius + radius)),
                getPaddingTop() + radius, radius, mPaintStroke);
    }
    

    @@ -92,7 +104,7 @@
    cx = (currentScroll * (2 * radius + radius)) / flowWidth;
    }
    // The flow width has been upadated yet. Draw the default position

  •   canvas.drawCircle(getPaddingLeft() + radius + cx,
    
  •   canvas.drawCircle(offset + radius + cx,
                getPaddingTop() + radius, radius, mPaintFill);
    

    }

Jarify

This project needs a .jar that I can add to my workspace without having to import the whole project into eclipse!

How to invalidate loaded view ?

In my Adapter in getView() method I call the AsyncTask for load data for current view
it takes time so on view shows the progress bar

Could you bring any suggestions how invalidate the already stored data in mLoadedViews
and redraw the current selected view after execute my async task ?

MinSDK version is not correct

Hi!

I tried to get it work with android 1.6(API4) but there are 2 issues with that.

  • ViewFlow.java:626 View.Group.LayoutParams.MATCH_PARENT
    In API4 there is no MATCH_PARENT, it should be named FILL_PARENT
  • ViewFlow.java:131 protected void onConfigurationChanged(Configuration newConfig) {
    API4 doesn't have an onConfigurationChanged() method in AdapterView class.

I got it working by commenting out the onConfigurationChanged method, but I don't know what this will cause.

Would be cool if this library could maintain API4 compatibility for a little longer.

AdapterDataSetObserver expected behavior?

Currently we have this code:

View v = getChildAt(mCurrentBufferIndex);
            if (v != null) {
                for (int index = 0; index < mAdapter.getCount(); index++) {
                    if (v.equals(mAdapter.getItem(index))) {
                        mCurrentAdapterIndex = index;
                        break;
                    }
                }
            }

But this seems to be comparing whatever kind of getItem() is returned from the Adapter with a View, which should almost never work.

My guess based on the logic is that you're trying to look up in the current buffer which view is active, and see if it still exists in the adapter. If it still exists, set that adapter index as the current index. Is that correct?

I think I've come up with a way to do this if the adapter hasStableIds():

  1. create mCurrentId, and set it to mAdapter.getItemId(mCurrentAdapterIndex) every time the adapter index changes (so in postViewSwitched and setSelection).

  2. use the following in onChanged:

if(mAdapter.hasStableIds()){
                // use the ID from where we currently are in the (old) adapter.
                for(int index = 0; index < mAdapter.getCount(); index++) {
                    if(mCurrentId == mAdapter.getItemId(index)){
                        mCurrentAdapterIndex = index;
                        break;
                    }
                }
            }

(However, while this code sets the underlying variables (adapter index and buffer index) properly, the subsequent call to resetFocus does not set the visible screen properly based on the new parameters. Can I cause that to happen without a call to setSelection, which forces a redraw that seems redundant if the current view is already on-screen?)

Dimension format for textSize attribute?

Hello,

I've been using your library and noticed that the textSize attribute (defined in res/values/attrs.xml) is formatted as an integer. Wouldn't it be better to set its format to "dimension", so that we could use sp or other dimension values?

You could then change the code in TitleFlowIndicator.java to something like:
float textSize = a.getDimension(R.styleable.TitleFlowIndicator_textSize, TEXT_SIZE);

There are also other attributes whose format should be changed to "dimension" in order to support multiple screens and user preferences. That's just my opinion.

The second issue, imho, is not being able to directly click adjacent views' titles instead of doing a fling gesture.

I apologize in advance if I misread some information.
Good job with this library! Keep it up!

Costi

Can not create JAR file

If I run create jar command I get error (failed).
Can someone please tell me how to fix it? Thx.

Scroll to position after set adapter

Could you add to sourse different type of setAdapter() with param scroll position ?
for example to scroll to the middle of views list

of course I can use the setSelection(int position)
but by this way after adapter creation it create and load some not needed views (0, 1, 2, ...)

java.lang.OutOfMemoryError: bitmap size exceeds VM budget

I get the following error when specifying 20x 231kb png's with transparency
I already set the buffer to 1

07-01 15:44:02.096: ERROR/AndroidRuntime(31557): java.lang.OutOfMemoryError: bitmap size exceeds VM budget

Any Ideas?

I've also tried not specifying the R.drawable.pic1 in the int array but finding them through getIdentifier and getDrawable, but to no luck...

CircleFlowIndicator

hi,
it looks like we need to take the circles' stroke width into measure consideration, otherwise the circle does not look like a circle..^_^

setSelection slow on certain device

This happened when i did setSelection to switch to the desired list. It has a delay for about 4 - 7 seconds. On faster device like samsung galaxy s2 it seems to be all right but not on older or less powerful device.

Vertical movements are not consumed

If I put a viewflow widget inside a scrollview the scrollview will scroll every time a user mixes a horizontal and vertical fling gesture. I tried to figure out how I could intercept those small vertical movements that are meant as a horizontal slide but not exact enough and result in the scrollview taking over the gesture detection, but I couldn't find the correct spot. The standard gallery seems to intercept those scroll gestures because it prevents the scrollview from moving, but the standard gallery does not handle recycling correct and therefore is not usable for larger amounts of images.

Building a jar won't include res/values/attrs.xml

The attributes in attrs.xml is not included in the jar built with ant. Referencing the jar file will then miss the attributes when declaring the viewflow in layout xml:s. I don't know if this is possible at all. Wrote a question related to it some time ago http://stackoverflow.com/questions/6428700/android-library-project-as-compiled-jar-library

Maybe the only way is to move the Android resource files to the referencing project and let it refernence the java code in the jar?

From: http://developer.android.com/guide/developing/projects/index.html#considerations

"You cannot export a library project to a JAR file
A library cannot be distributed as a binary file (such as a jar file). This is because the library project is compiled by the main project to use the correct resource IDs."

selectedBold attribute

The attribute selectedBold doesn't have any effect, probably because of an error in the TitleFlowIndicator constructor.

Problem with MeasureSpec.EXACTLY

I'm trying to replace a Gallery widget with ViewFlow and I get an error that "ViewFlow can only be used in EXACTLY mode." I assume that the cause of this is that I have the ViewFlow inside a ScrollView.

Is this "EXACTLY-requirement" necessary or can we make ViewFlow more similar to Gallery, for instance by extending AbsSpinner instead of AdapterView?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.