android - Button Zoom on a table layout -


I want to implement the button on this table layout or kissing the zoom. how to do this? Anyone who is easy to implement, has to do it.

  & lt; Horizontal scalve xmlns: android = "http://schemas.android.com/apk/res/android" Android: padding = "10dp" Android: layout_width = "match_parent" Android: layout_height = "match_parent" & gt; End left; Android: ScrollView Android: Layout_blo = "@ + ID / Table Header" Android: layout_width = "match_parent" android: layout_height = "match_parent" android: id = "@ + ID / scroll zoomview" & gt; & Lt; TableLayout: Android: id = "@ + id / main_table" Android: layout_height = "wrap_content" Android: layout_width = "match_parent" /> & Lt; / Scrollview & gt; & Lt; / HorizontalScrollView & gt;   

Edit to add Java code:

  zoomIn.setOnClickListener (New OnClickListener () {@Override Click Public Zero (see ARG0) {Zoom (2.0f, 2.0 F, 0.0F, 0.0F);}}); ZoomOut.setOnClickListener (New OnClickListener) {@Override Public Zero Click on (see ARG0) {Zoom (1.0 F, 1.0 F, 0.0F, 0.0F);}}); Public Zero Zoom (Float Scalax, Float Scale, Float Pivotax, Float Poverty) {sv.setScaleX (scalex); Sv.setScaleY (scaleY); Sv.setPivotX (pivotx); Sv.setPivotY (pivoty); Sv.requestLayout (); }   

The problem I am having is that scrolling width and height are not updating itself to fit the enlarged data. For example, there are 100 rows in the table, now after zooming in, I'm able to scroll up to the 80th line with expanded text. When I zoomed out, bam! I see the 100th line in general size. I

I've added

  sv.requestLayout (); Also tried  
  invalid ();   

Nothing worked.

What's the problem here? How to solve it?

Have you tried changing prices? Find Table Layout Main Layout = (Table Layout) VVBID (RIDMAN_table); Zoomview (see, 1.5); // zoom in 150% zoomview (see, 0.5); // zoom out 50% function zoomview (see view, int zoom x) {view group. LayoutParam VisualType = ViewGate LayoutParam (); See Param. Wide * = zoomax; See Param. Hight * = ZoomX; View.setLayoutParams (viewParams); }

Note: This will scale your table layout , but you will have to make the child the view fluid so that they Adjust according to your parent layout.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -