-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xiaoyao
committed
Jul 11, 2017
1 parent
09a7488
commit fe4bf89
Showing
12 changed files
with
852 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
app/src/main/java/com/allen/supertextview/SuperButtonActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.allen.supertextview; | ||
|
||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
|
||
import com.allen.library.SuperTextView; | ||
import com.bumptech.glide.Glide; | ||
import com.bumptech.glide.load.resource.drawable.GlideDrawable; | ||
import com.bumptech.glide.request.animation.GlideAnimation; | ||
import com.bumptech.glide.request.target.SimpleTarget; | ||
import com.squareup.picasso.Picasso; | ||
|
||
/** | ||
* Created by allen on 2017/7/10. | ||
*/ | ||
public class SuperButtonActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.super_button_layout); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:stv="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:padding="20dp"> | ||
|
||
<com.allen.library.SuperTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
stv:sLeftTextString="声音" | ||
stv:sRightViewType="switchBtn" | ||
stv:sShapeCornersRadius="10dp" | ||
stv:sShapeSelectorPressedColor="@color/gray" | ||
stv:sShapeStrokeColor="@color/colorAccent" | ||
stv:sShapeStrokeWidth="0.3dp" | ||
stv:sSwitchIsChecked="true" | ||
stv:sSwitchMinWidth="40dp" | ||
stv:sThumbResource="@drawable/thumb" | ||
stv:sTrackResource="@drawable/track" | ||
stv:sUseShape="true" /> | ||
|
||
<com.allen.library.SuperTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="20dp" | ||
stv:sLeftTextString="账号与安全" | ||
stv:sRightIconRes="@drawable/arrow_right_red" | ||
stv:sRightTextString="已保护" | ||
stv:sRightTvDrawableLeft="@drawable/v1" | ||
stv:sShapeCornersRadius="5dp" | ||
stv:sShapeSelectorPressedColor="@color/gray" | ||
stv:sShapeStrokeColor="@color/colorAccent" | ||
stv:sShapeStrokeWidth="0.3dp" | ||
stv:sUseShape="true" /> | ||
|
||
|
||
<com.allen.library.SuperTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="20dp" | ||
stv:sLeftTextString="上圆角" | ||
stv:sRightIconRes="@drawable/arrow_right_red" | ||
stv:sShapeCornersTopLeftRadius="10dp" | ||
stv:sShapeCornersTopRightRadius="10dp" | ||
stv:sShapeSelectorPressedColor="@color/gray" | ||
stv:sShapeStrokeColor="@color/colorAccent" | ||
stv:sShapeStrokeWidth="0.2dp" | ||
stv:sUseShape="true" /> | ||
|
||
<com.allen.library.SuperTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="20dp" | ||
stv:sLeftTextString="下圆角" | ||
stv:sRightIconRes="@drawable/arrow_right_red" | ||
stv:sShapeCornersBottomLeftRadius="10dp" | ||
stv:sShapeCornersBottomRightRadius="10dp" | ||
stv:sShapeSelectorPressedColor="@color/gray" | ||
stv:sShapeStrokeColor="@color/colorAccent" | ||
stv:sShapeStrokeWidth="0.2dp" | ||
stv:sUseShape="true" /> | ||
|
||
<com.allen.library.SuperTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="20dp" | ||
stv:sCenterTextColor="@color/white" | ||
stv:sCenterTextString="填充色" | ||
stv:sShapeCornersRadius="10dp" | ||
stv:sShapeSelectorNormalColor="@color/red_btn" | ||
stv:sShapeSelectorPressedColor="@color/gray" | ||
stv:sUseShape="true" /> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.