如果报红说明地址出错了,需要重新配置最新的指令
如果报错
android.view.InflateException: Binary XML file line #139: Binary XML file line #139: Error inflating class <unknown>
需要添加Kotlin资源库
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
SuperTextView super_tv = (SuperTextView) injector.findViewById(R.id.super_tv);
LinearLayout.LayoutParams topLayoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
topLayoutParams.setMargins(0, 10, 10, 0);//4个参数按顺序分别是左上右下
super_tv.getLeftTopTextView().setLayoutParams(topLayoutParams);
super_tv.getRightTopTextView().setLayoutParams(topLayoutParams);
super_tv.getLeftTopTextView().setTypeface(null, Typeface.BOLD);
super_tv.getRightTopTextView().setTypeface(null, Typeface.BOLD);
LinearLayout.LayoutParams bottomLayoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
bottomLayoutParams.setMargins(0, 0, 10, 10);//4个参数按顺序分别是左上右下
super_tv.getRightBottomTextView().setLayoutParams(bottomLayoutParams);
super_tv.getLeftBottomTextView().setLayoutParams(bottomLayoutParams);
super_tv.setLeftTopString(data.getPhone_number());
super_tv.setLeftBottomString(data.getPhone_record_duration());
super_tv.setRightTopString(data.getPhone_number());
super_tv.setRightBottomString(data.getPhone_create_date());
<com.allen.library.SuperTextView
android:id="@+id/super_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/colorAccent"
ctv:cCenterTextViewLineSpacingExtra="2dp"
ctv:cLeftTextViewLineSpacingExtra="2dp"
ctv:cRightTextViewLineSpacingExtra="2dp"
stv:sDividerLineType="none"
stv:sLeftBottomTextString="00:00"
stv:sLeftIconRes="@drawable/icon_record_file"
stv:sLeftTopTextSize="18sp"
stv:sLeftTopTextString="49015"
stv:sLeftViewGravity="left_center"
stv:sRightBottomTextString="1970年1月2日 08:11"
stv:sRightTopTextString="49015"
stv:sRightViewGravity="left_center" />
禁止点击:
app:sUseRipple="false"
注释这行代码,就可以运行了
https://github.com/lygttpod/SuperTextView
Failed to apply plugin 'com.github.dcendents.android-maven'.