Home > Mobile >  Magnifies the linearlayout excuse me, how to make the linearlayout wide high also enlarge
Magnifies the linearlayout excuse me, how to make the linearlayout wide high also enlarge

Time:12-02

Magnifies the linearlayout excuse me, how to make the linearlayout wide high also enlarge? Want to enlarge, the scroll bar can preview all of the content,
If I directly modifying the size of the layout, the center of the amplification began from the upper left corner, can't enlarge from double refers to the zoom?
 & lt; ? The XML version="1.0" encoding="utf-8"?> 
The android: id="@ + id/scaleScrollView"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
Android: scrollbars="vertical"


The android: id="@ + id/scaleLinearLayout"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
Android: orientation="vertical"
Android: scaleX="2"
Android: scaleY="2"
Android: focusable="true" & gt;

Android: layout_width="match_parent"
Android: layout_height="wrap_content"
Android: layout_margin="10 dp"
Android: adjustViewBounds="true"
Android: scaleType="fitXY"
The android: SRC="https://bbs.csdn.net/topics/@mipmap/p1"/& gt;

Android: layout_width="match_parent"
Android: layout_height="wrap_content"
Android: layout_margin="10 dp"
Android: adjustViewBounds="true"
Android: scaleType="fitXY"
The android: SRC="https://bbs.csdn.net/topics/@mipmap/p2"/& gt;

CodePudding user response:

Now I use two ways to
Way 1: using matrix scaling, this can realize double refers to the center to zoom in layout, but after amplification, cannot by scrolling preview contents, and departments are shown is not complete, because matrix does not affect the height to width,
Method 2: adopt direct modification of height to width scaling, but this can only be from the top left corner as the center of amplification, if the roller in the experience is very poor, can't in double refers to large size?
O great god teach
  • Related