Giter Club home page Giter Club logo

popoverview's People

Contributors

lupidan 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

popoverview's Issues

IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first

I got few doubts:

I got IllegalStateException on line 307( popoverview,java), when I tried to attach a view to popover view inside the popoverview.java class.

Also when we add characters it's working fine on tablets, but when it comes to phones, its get truncated. Is there any method like wrap content, provided by android?

This should be handled inside the library or is it open to developer for handling that scebnario. Everything excepts works fine for this library.

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

popover position

hey, previous issue solved, thank you for your hint,

I have a new problem, I'm using the popover to pop after a selection on a webview is made. When I load the html on the webview I scroll through it horizontally, when the pop over is used to pop on the first page there's no problem and the popover position is exactly where I clicked, but the problem is that when I scroll to another, the popover still pops on the first page of the webview.
would you kindly look into it and let me know what I'm doing wrong.
Thank u.

How to set click event on textview in popover

I am many textview in popover view. But i am not able to get click event on textview.

I did get any idea to how to get click event on textview which was in popover view.

Thanks in advance.

WebViewCoreThread fatal exception

I would like to thank you for this solution, it is very helpful. I'm trying to integrate this solution in my project, but I'm still new to android, what I'm trying to do is to run the following function from the webview class I have, and its triggered by a button. The problem is when it reaches popoverView.showPopoverFromRectInViewGroup it gives WebViewCoreThread fatal exception. android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
NB: I have changed the textWebView in popover_showed_view into a webview cause I have html content to show.
public void openPopOverWithContent(String content, Rect displayR)
{
PopoverView popoverView = new PopoverView(context, R.layout.popover_showed_view);
popoverView.setContentSizeForViewInPopover(new Point(320, 340));
popoverView.setDelegate(this);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.loadDataWithBaseURL(null, "hello", "text/html", "utf-8", null);

    Rect viewRect = new Rect(300, 300, 300, 320);

    popoverView.showPopoverFromRectInViewGroup(this, viewRect, PopoverView.PopoverArrowDirectionAny, true); 

}

Thanx in advance

ViewPager in popoverview

is this possible - ViewPager with multiple fragments within the popoverview? pretty much this example in a popover, nothing more complex than this.

http://developer.android.com/training/animation/screen-slide.html

I have tried to take the example and add to the popoverview. unsuccessful. still a bit new to android. how would i go about doing this?

this would be a great addition to the popoverview

thanks and keep up the good work :)

Button Event handler in popover not working

Hy,

I have defined in my popover view a button and defined a click handler for it.
The click handler does not trigger.

RelativeLayout rootView = (RelativeLayout)findViewById(R.id.rootLayout);

    PopoverView popoverView = new PopoverView(this, R.layout.popover_showed_view);
    popoverView.setContentSizeForViewInPopover(new Point(320, 340));
    popoverView.setDelegate(this);

    View popoverViewReference = getLayoutInflater().inflate(R.layout.popover_showed_view, null);    

    if( popoverViewReference != null)
    {
        btn_popoverSearch = (Button) popoverViewReference.findViewById(R.id.btn_test);
        btn_popoverSearch.setOnClickListener(new OnClickListener() 
        {
            @Override
            public void onClick(View v) 
            {
                                  //handler code here
            }
        });
    popoverView.showPopoverFromRectInViewGroup(rootView, PopoverView.getFrameForView(v), PopoverView.PopoverArrowDirectionAny, true);
    }

The btn_popoverSearch is found and is not null but the event handler is not called.
Any suggestions? Thanks a lot.

it's better to support fragment

It's better to support fragment so we can go to other views in the popover view ( similar like UINavigationController in popover)

PopoverView from an ActionBar MenuItem

My apologies for being a little vague in this first question, but I am not very far along.

I would like to display the PopoverView from an ActionBar MenuItem, and am not getting the desired results. I am using the ActionBarSherlock library.

Here is a snippet of code where I am attempting to set up the PopoverView.

 @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        if (item.getItemId() == android.R.id.home) {

            //...
        } else if (item.getItemId() == R.id.action_notifications) {         

            PopoverView popoverView = new PopoverView(this, R.layout.popover_notifications_view);
            popoverView.setDelegate(this);

            RelativeLayout rootView = (RelativeLayout)findViewById(R.id.rootLayout);

            popoverView.setContentSizeForViewInPopover(new Point(640, 680));
            View v = (View)findViewById(R.id.action_notifications);

            popoverView.showPopoverFromRectInViewGroup(rootView, PopoverView.getFrameForView(v), PopoverView.PopoverArrowDirectionAny, true);

            return(true);

        }

        return super.onOptionsItemSelected(item);
    }

I feel like the view used for PopoverView.getFrameForView(v) is wrong. I'm trying to reference the globe item in the screenshot. I am getting the PopoverView underneath the ActionBar like this:

screenshot_2014-01-09-10-48-45

Any direction or sample would be very much appreciated.
Jeremy

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.