Closed ANewAnonymous closed 1 year ago
在插件项目的某个布局中,有两个紧挨着的TextView,将它们其中一个TextView设置textSize大小为16sp,另一个不设置大小,在插件打包和调试过程中显示正常,当作为内置插件提供给宿主app时,未设置字体大小的TextView字体大小变的非常大,使用Layout Insptctor查看结果为22sp。
<LinearLayout android:layout_width="match_parent" android:layout_height="@dimen/dp_40" android:layout_marginTop="@dimen/dp_15" android:gravity="center" android:orientation="horizontal">
<FrameLayout android:id="@+id/fl_check" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:contentDescription="TODO" android:src="@mipmap/ic_login_check" /> <ImageView android:id="@+id/iv_check" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginLeft="@dimen/dp_1" android:layout_marginBottom="@dimen/dp_3" android:contentDescription="TODO" android:src="@mipmap/ic_login_check1" /> </FrameLayout> <TextView android:layout_marginLeft="@dimen/dp_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Privacy_Policy_isRead2" /> <TextView android:id="@+id/tv_Privacy" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text=" Privacy Policy" android:textSize="16sp" android:textColor="@color/color_444444" /> </LinearLayout>
replugin-host: replugin-plugin-gradle version:2.3.4 replugin-host-lib version:2.3.4 Android Gradle Plugin Version:3.3.3 Gradle Version:4.10.1
replugin-plugin: replugin-plugin-gradle version:2.3.4 replugin-plugin-lib version:2.3.4 Android Gradle Plugin Version:3.3.3 Gradle Version:4.10.1
问题详细描述 Detailed description of the problem
在插件项目的某个布局中,有两个紧挨着的TextView,将它们其中一个TextView设置textSize大小为16sp,另一个不设置大小,在插件打包和调试过程中显示正常,当作为内置插件提供给宿主app时,未设置字体大小的TextView字体大小变的非常大,使用Layout Insptctor查看结果为22sp。
复现问题步骤 Steps to reproduce the problem
插件调试过程
插件代码及图片
布局代码:
<LinearLayout android:layout_width="match_parent" android:layout_height="@dimen/dp_40" android:layout_marginTop="@dimen/dp_15" android:gravity="center" android:orientation="horizontal">
插件直接调试显示正常
插件直接调试显示正常,使用Layout Insptctor查看布局字体大小
把插件apk作为内置插件放到宿主包中调试过程
宿主包调试过程
宿主显示效果
宿主直接调试显示不正常,使用Layout Insptctor查看布局字体大小
宿主直接调试显示正常,使用Layout Insptctor查看布局字体大小
其它重要信息 Other important information
replugin-host: replugin-plugin-gradle version:2.3.4 replugin-host-lib version:2.3.4 Android Gradle Plugin Version:3.3.3 Gradle Version:4.10.1
replugin-plugin: replugin-plugin-gradle version:2.3.4 replugin-plugin-lib version:2.3.4 Android Gradle Plugin Version:3.3.3 Gradle Version:4.10.1