-
混淆后命令行执行恢复crash原样: /Android/Sdk/tools/proguard/bin/retrace.sh mapping.txt crash.txt
-
查看 release apk 的日志:adb shell "ps | grep com.xx.xx.xxx"(根据包名找pid) , 再执行adb shell "logcat | grep pidxxx"根据pid监视日志输出)
-
ContentResolver.insert 返回的Uri总是null,请检查设置的MediaStore.Images.Media.DISPLAY_NAME或MediaStore.Video.Media.DISPLAY_NAME的名字是重复的,就是是否是已经存在的了
-
一个TextView在前面的自适应,没法显示就打点省略,后面的紧跟其后(用约束布局实现):
效果图:
文字少时
文字多时
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/text_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:singleLine="true"
android:ellipsize="end"
android:text="加载中哈"
android:textColor="#ff262628"
android:textSize="24dp"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/sexImgV"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<ImageView
android:id="@+id/sexImgV"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="8dp"
android:src="@drawable/icon_sex_man"
app:layout_constraintLeft_toRightOf="@id/text_user_name"
app:layout_constraintRight_toLeftOf="@+id/vipFlagRy"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<com.cy.necessaryview.shapeview.RecShapeLinearLayout
android:id="@+id/vipFlagRy"
android:layout_width="63dp"
android:layout_height="22dp"
android:orientation="horizontal"
android:gravity="center"
app:colorCenter="#E6E8ED"
app:colorEnd="#E9EAEF"
app:colorStart="#E4E6EC"
app:radiusCorner="12dp"
app:layout_constraintLeft_toRightOf="@id/sexImgV"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/vipFlagImgV"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/icon_vip_flag_normal" />
<TextView
android:id="@+id/vipFlagT"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:text="SVIP"
android:textColor="#FF888888"
android:textSize="12dp" />
</com.cy.necessaryview.shapeview.RecShapeLinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
网友评论