Skip to content

Commit

Permalink
Merge branch 'master' of github.com:humanheima/ViewDemo
Browse files Browse the repository at this point in the history
  • Loading branch information
forrest.du committed Aug 15, 2021
2 parents 60aadbe + 1bb6dcf commit 2ca43c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import kotlin.math.ceil
*/
class CardViewActivity : AppCompatActivity() {


private val TAG: String = "CardViewActivity"

private val SHADOW_MULTIPLIER = 1.5f
Expand All @@ -32,6 +31,7 @@ class CardViewActivity : AppCompatActivity() {

//圆角12dp
private var mRadius: Int = 12

//阴影和最大阴影都设为16dp
private var mElevation: Int = 16
private var mMaxElevation: Int = 16
Expand All @@ -43,6 +43,7 @@ class CardViewActivity : AppCompatActivity() {

companion object {


fun launch(context: Context) {
val intent = Intent(context, CardViewActivity::class.java)
context.startActivity(intent)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_card_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@


<View

android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorAccent" />
Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@
android:textAllCaps="false" />

<Button
android:id="@+id/btnCustomViewGetStart"
android:id="@+id/btn_test_outline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClick"
android:text="《Android自定义控件开发入门与实战》"
android:text="测试 剪裁轮廓"
android:textAllCaps="false" />

<Button
android:id="@+id/btn_test_outline"
android:id="@+id/btnCustomViewGetStart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClick"
android:text="测试View的轮廓剪裁"
android:text="《Android自定义控件开发入门与实战》"
android:textAllCaps="false" />


<Button
android:id="@+id/btn_myruler_view"
android:layout_width="match_parent"
Expand Down

0 comments on commit 2ca43c1

Please sign in to comment.