whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

double click event in piechart Options · View
vijayakumar
#1 Posted : Wednesday, July 14, 2010 2:55:15 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/27/2010
Posts: 31
Location: chennai
Hi friends,

can anybody tell how to implement double click event in piechart




Thanks
Baydalka Volodymyr
#2 Posted : Wednesday, July 14, 2010 3:12:23 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Please check the android documentation :
GestureDetector
GestureDetector.OnDoubleTapListener

Best regards,
Volodymyr Baydalka
Andriod development and support team
vijayakumar
#3 Posted : Monday, July 19, 2010 9:08:28 AM
Rank: Advanced Member

Groups: Registered

Joined: 4/27/2010
Posts: 31
Location: chennai
Hi,
can any body tell if i double click the chart point some events will occur?.actually i implemented gesture detector if i double clicked in anywhere in activity it will occur.Iwant to implement for double click chart point


Thanks
Baydalka Volodymyr
#4 Posted : Monday, July 19, 2010 1:27:21 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
vijayakumar wrote:
actually i implemented gesture detector if i double clicked in anywhere in activity it will occur.


OK, now you need to use ChartView.hitTest method to determine if clicked location is inside the point

Best regards,
Volodymyr Baydalka
Andriod development and support team
vijayakumar
#5 Posted : Monday, July 19, 2010 3:15:55 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/27/2010
Posts: 31
Location: chennai
how to implement chartview.hit test method in gesture detector

Code:


public class PieChartActivity extends Activity implements OnClickListener, android.view.GestureDetector.OnGestureListener,OnDoubleTapListener,OnTouchListener {


@Override
    
    public boolean onDoubleTap(MotionEvent e) {
        // TODO Auto-generated method stub
        chartView =(ChartView) findViewById(R.id.piechart);
        ChartSeries series=chartView.getSeries().get(0);
        chartView.setHitTestEnabled(true);
        List<?> objs = chartView.hitTest((int)e.getX(), (int)e.getY());
        //ChartPoint point=series1
        for (Object object : objs)
        {
            if(object instanceof ChartPoint)
            {
                m_point = (ChartPoint)object;
                Intent chart = new Intent(this,BarActivity.class);
                chart.putExtra("data", data);
                //bar.putExtra("profile", profile);
               startActivity(chart);
            }
        }    
         return false;
    }





this is not working properly
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.