Closed diguacook closed 6 years ago
有一个页面出现这种情况其他页面正常,暂时发现在7.2系统上的问题,布局是在fragment上的,<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#EEEEEE" tools:context=".view.fragment.SettingFragment">
<!-- TODO: Update blank fragment layout -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30pt"
android:layout_marginRight="30pt"
android:layout_marginTop="10pt"
android:background="@drawable/normal_bg">
<ImageView
android:id="@+id/iv_head"
android:layout_width="100pt"
android:layout_height="100pt"
android:layout_margin="10pt"
android:scaleType="centerCrop"
android:src="@mipmap/green_ogre_01" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20pt"
android:layout_marginTop="10pt"
android:layout_toRightOf="@id/iv_head"
android:orientation="vertical">
<TextView
android:id="@+id/tv_settingcount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="账号:"
android:textSize="30pt" />
<TextView
android:id="@+id/tv_settingname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10pt"
android:text="姓名:"
android:textSize="30pt" />
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30pt"
android:layout_marginRight="30pt"
android:layout_marginTop="10pt"
android:background="@drawable/normal_bg"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10pt"
android:layout_marginTop="10pt"
android:text="事件提醒"
android:textSize="30pt" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5pt"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="紧急事件提醒次数:"
android:textSize="30pt" />
<LinearLayout
android:layout_width="160pt"
android:layout_height="wrap_content"
android:background="@drawable/item_service_bg">
<Spinner
android:id="@+id/sp_ime"
android:layout_width="160pt"
android:layout_height="60pt"
android:overlapAnchor="false" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5pt"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="一般事件提醒次数:"
android:textSize="30pt" />
<LinearLayout
android:layout_width="160pt"
android:layout_height="wrap_content"
android:background="@drawable/item_service_bg">
<Spinner
android:id="@+id/sp_normal"
android:layout_width="160pt"
android:layout_height="60pt"
android:overlapAnchor="false"
android:spinnerMode="dropdown" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5pt"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:layout_width="100pt"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="震动:"
android:textSize="30pt" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ToggleButton
android:id="@+id/tlb_select"
android:layout_width="60pt"
android:layout_height="50pt"
android:background="@drawable/selector_btn_toggle"
android:checked="false"
android:textOff=""
android:textOn="" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/vision"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30pt"
android:layout_marginRight="30pt"
android:layout_marginTop="10pt"
android:background="@drawable/normal_bg"
android:orientation="horizontal"
android:padding="10pt">
<TextView
android:id="@+id/tv_versionname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="版本更新(当前版本:V1.1)"
android:textSize="30pt" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_changcompanyname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30pt"
android:layout_marginRight="30pt"
android:layout_marginTop="10pt"
android:background="@drawable/normal_bg"
android:orientation="horizontal"
android:padding="10pt">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="修改标题名称"
android:textSize="30pt" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_relation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30pt"
android:layout_marginRight="30pt"
android:layout_marginTop="10pt"
android:background="@drawable/normal_bg"
android:orientation="horizontal"
android:padding="10pt">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="关于"
android:textSize="30pt" />
</LinearLayout>
</LinearLayout>
</ScrollView>
这个是布局代码
跟布局肯定无关,能给一个简单的demo看一下吗,可能是fragment加载的时候重置了
联系方式?
主要是浮现不太容易
383868303@qq.com
加你qq了
我也遇到过,是偶尔很大,重启一到两次才好,在application中初始化的
@Yhao90 偶现吗 还是必现 ?
@Firedamp 偶然出现多重启几次就好了,我是在application中初始化的
@Yhao90 你试一下在出现问题的组件调用oncreate时调用RudenessScreenHelper.resetDensity试试。 最近通过大家反馈确实发现偶然会有一些地方会失效,我还在另谋出路
给个demo看看?