yunjianwu / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

adding External ImageButtons on view next to chart causes strange UI behavior #171

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi.

I wanted to have external ImageButtons to control zoom events.

I created layout like this (just for you to have a picture):

<RelativeLayout ...>
   <LinearLayout android:id="@+id/chart" .../>
   <LinearLayout>
      <ImageButton android:id="@+id/zoomIn" .../>
      <ImageButton android:id="@+id/zoomOut" .../>
   </LinearLayout>
</RelativeLayout>

Image button are triggering the zoom events (mChartView.zoomIn() and 
mChartView.zoomOut()), but the problem is in UI display:

PROBLEM:

When I press the ImageButton the clone of chart view appears squeezed at the 
back of pressed button.It is there for only one second and then disappears. 

Does anybody have a clue why this happens?

I hope I explained it clearly because I can't make print screen.

Regards,
Toni

Original issue reported on code.google.com by toniabc@gmail.com on 26 Jan 2012 at 8:18

GoogleCodeExporter commented 9 years ago
I forgot to tell that sample code is not complete. I removed attributes for 
better view and left just id, that you can  know where is the chart view and 
where are the buttons.

Original comment by toniabc@gmail.com on 26 Jan 2012 at 8:21

GoogleCodeExporter commented 9 years ago
attaching a print screen.
Regards,
Toni

Original comment by toniabc@gmail.com on 26 Jan 2012 at 4:44

Attachments:

GoogleCodeExporter commented 9 years ago
Attaching also dummy eclipse project example.

Just import project via File/Import/Existing Project into workspace

Thank you,
Toni

Original comment by toniabc@gmail.com on 27 Jan 2012 at 2:39

Attachments:

GoogleCodeExporter commented 9 years ago
Have you tried renderer.setInScroll(true)?

Original comment by dandrome...@gmail.com on 31 Mar 2012 at 2:47

GoogleCodeExporter commented 9 years ago
Hi Dan.

Your solution works. Thank you for your help and effort to build such a good 
tool.

Regards,
Toni

Original comment by toniabc@gmail.com on 1 Apr 2012 at 7:58

GoogleCodeExporter commented 9 years ago
Awesome.

Original comment by 4viewsoft@gmail.com on 1 Apr 2012 at 3:28

GoogleCodeExporter commented 9 years ago
Well, renderer.setInScroll(true) does work, but I'm not sure this implies a 
'Fixed' status as my chart is not in a scroll container.  Resizing still seems 
to work, but this feels like a hack rather than a fix.  Still pleased to see it 
work though :)

Original comment by cknight1...@gmail.com on 7 Apr 2012 at 10:23

GoogleCodeExporter commented 9 years ago
hi i need to show text on place of value which show with line and bar not with 
xlable and y lable

and when i  multiRenderer.setYAxisMin(-30);
    multiRenderer.setYAxisMax(-100);     then bar is showing start from up and come to down i want to start graph on down to up on this setLable values

Original comment by greadank...@gmail.com on 19 Dec 2012 at 9:32

Attachments: