This commit is contained in:
parent
1ebc418b71
commit
0121730a8a
|
@ -6,9 +6,6 @@ import android.text.TextPaint;
|
|||
import android.text.style.ClickableSpan;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* Created by juan on 2018/06/26.
|
||||
*/
|
||||
public class ButtonSpan extends ClickableSpan {
|
||||
|
||||
View.OnClickListener onClickListener;
|
||||
|
|
|
@ -61,6 +61,9 @@ public class ToolActivity extends AppCompatActivity {
|
|||
ImageView imageView10=findViewById(R.id.imageView22);
|
||||
String url10="http://106.53.194.250:30089/i/2024/06/13/666aeef2b073b.png";
|
||||
Glide.with(this).load(url10).into(imageView10);
|
||||
ImageView imageView23=findViewById(R.id.imageView23);
|
||||
String url11="http://106.53.194.250:30089/i/2024/06/18/66717233e069e.png";
|
||||
Glide.with(this).load(url11).into(imageView23);
|
||||
|
||||
constraintLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -88,7 +91,7 @@ public class ToolActivity extends AppCompatActivity {
|
|||
mContentExpandTextView.initWidth(getWindowManager().getDefaultDisplay().getWidth());
|
||||
// 设置最大行数
|
||||
mContentExpandTextView.setMaxLines(2);
|
||||
String content = "中国共产党是中国工人阶级的先锋队,同时是中国人民和中华民族的先锋队,是中国特色社会主义事业的领导核心,代表中国先进生产力的发展要求,代表中国先进文化的前进方向,代表中国最广大人民的根本利益。党的最高理想和最终目标是实现共产主义。";
|
||||
String content = "我做了一个梦,一个很好玩的梦,我要记录下它。阳光灿烂,一直奔跑,一直跑一直跑一直跑一直跑一直跑一直跑一直跑一直跑。还在跑还在跑还在跑还在跑还在跑还在跑还在跑";
|
||||
mContentExpandTextView.setCloseText(content);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="line" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke
|
||||
android:dashWidth="2dp"
|
||||
android:dashGap="2dp"
|
||||
android:color="#BBBBBB"
|
||||
android:width="1dp"/>
|
||||
</shape>
|
|
@ -511,16 +511,162 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView49">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txt_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView55"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/dotted_line"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="49dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/constraintLayout11"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView24"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="80dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView50"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="分享"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout11"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="49dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/constraintLayout12"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout10"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView25"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="80dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView51"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="18"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout12"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="49dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout11"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView54"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="200"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView26"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="80dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView53"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="#EB6E6E"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView23"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView23" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView23"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView52"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="20dp"
|
||||
android:text="TextView"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.hnucm.c202201020328.ExpandTextView
|
||||
android:id="@+id/txt_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="170dp"
|
||||
android:layout_height="140dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222"
|
||||
android:textColor="#BBBBBB"
|
||||
|
||||
android:textColor="#BBBBBB"
|
||||
android:textSize="18dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="colorAccent">#000000</color>
|
||||
<color name="colorAccent">#1BA4F9</color>
|
||||
</resources>
|
Loading…
Reference in New Issue