Skip to content

Commit

Permalink
add switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
pichsy committed Feb 24, 2021
1 parent 572f18a commit 45d9b43
Show file tree
Hide file tree
Showing 7 changed files with 1,705 additions and 36 deletions.
5 changes: 0 additions & 5 deletions app/src/main/java/com/pichs/app/xwidget/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

ImageView iv111 = findViewById(R.id.iv111);
// iv111.setColorFilter(Color.parseColor("#00000000"), PorterDuff.Mode.SRC);



TextView tv = findViewById(R.id.tv1);
XCardButton btn = findViewById(R.id.btn1);
btn.setOnClickListener(new View.OnClickListener() {
Expand Down
39 changes: 8 additions & 31 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,6 @@
android:orientation="vertical"
tools:context=".MainActivity">

<ImageView
android:id="@+id/iv111"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="#ff0000" />

<com.pichs.common.widget.roundview.XRoundTextView
android:text="你好"
android:gravity="center_vertical"
android:background="#60f"
android:layout_marginTop="20dp"
app:xp_radius="30dp"
app:xp_borderColor="#F11010"
android:clickable="true"
app:xp_borderWidth="5dp"
app:xp_backgroundGradientStartColor="#0f7"
app:xp_backgroundGradientEndColor="#323DD6"
app:xp_pressedBorderColor="#0ff"
app:xp_pressedBackground="#07f"
android:layout_width="100dp"
android:layout_height="60dp"/>

<com.pichs.common.widget.cardview.XCardButton
android:id="@+id/btn1"
android:layout_width="180dp"
Expand Down Expand Up @@ -99,15 +77,14 @@
app:layout_constraintTop_toBottomOf="@+id/btn1"
app:xp_ignoreGlobalTypeface="true" />

<com.pichs.common.widget.view.XEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="大街坊邻居萨拉"
android:textColor="@color/white"
android:textColorHint="@color/white"
app:xp_backgroundGradientEndColor="#00f"
app:xp_backgroundGradientStartColor="#f00"
app:xp_disableCopyAndPaste="false" />


<com.pichs.common.widget.switcher.XSwitchButton
android:layout_width="60dp"
app:xp_swb_thumbColor="#fff"
app:xp_swb_backColor="#00f"
android:layout_height="30dp"/>


<Space
android:layout_width="match_parent"
Expand Down
Loading

0 comments on commit 45d9b43

Please sign in to comment.