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! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
vijayakumar  
#1 Posted : Wednesday, July 14, 2010 4:55:15 PM(UTC)
vijayakumar
Rank: Advanced Member

Groups: Registered
Joined: 4/27/2010(UTC)
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 5:12:23 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

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 11:08:28 AM(UTC)
vijayakumar
Rank: Advanced Member

Groups: Registered
Joined: 4/27/2010(UTC)
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 3:27:21 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

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 5:15:55 PM(UTC)
vijayakumar
Rank: Advanced Member

Groups: Registered
Joined: 4/27/2010(UTC)
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 (2)
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-2017 ArtfulBits. All rights reserved.