-
Notifications
You must be signed in to change notification settings - Fork 2
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
yuhao
committed
Apr 4, 2019
1 parent
681ebd9
commit b33a53f
Showing
15 changed files
with
571 additions
and
15 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
30 changes: 30 additions & 0 deletions
30
bl_demo/src/main/java/com/bailun/bl_demo/BailunBtnActivity.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,30 @@ | ||
package com.bailun.bl_demo; | ||
|
||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
|
||
import com.bailun.bl_uilib.BailunButton; | ||
|
||
/** | ||
* BailunButton演示Demo | ||
* | ||
* @author yh | ||
*/ | ||
public class BailunBtnActivity extends AppCompatActivity { | ||
|
||
private BailunButton btnHuichachaLoading; | ||
private BailunButton btnHuichachaSelect; | ||
private BailunButton btnHuihuLoading; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_bailun_btn); | ||
btnHuichachaLoading = findViewById(R.id.btn_huichacha_loading); | ||
btnHuichachaLoading.startLoading(); | ||
btnHuichachaSelect = findViewById(R.id.btn_huichacha_select); | ||
btnHuichachaSelect.setSelected(true); | ||
btnHuihuLoading = findViewById(R.id.btn_hui_hu_loading); | ||
btnHuihuLoading.startLoading(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
bl_demo/src/main/java/com/bailun/bl_demo/MainActivity.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 |
---|---|---|
@@ -1,13 +1,23 @@ | ||
package com.bailun.bl_demo; | ||
|
||
import android.content.Intent; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
import com.bailun.bl_uilib.BailunButton; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
findViewById(R.id.btn_go_to_bailun_btn_demo).setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
startActivity(new Intent(MainActivity.this,BailunBtnActivity.class)); | ||
} | ||
}); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
bl_demo/src/main/res/color/selector_huihu_btn_blue_tv_color.xml
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,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item android:color="#a2c8f5" android:state_pressed="true" /> | ||
<item android:color="#b6b6b6" android:state_enabled="false" /> | ||
<item android:color="#ffffff" /> | ||
|
||
</selector> |
25 changes: 25 additions & 0 deletions
25
bl_demo/src/main/res/drawable/selector_huihu_btn_blue_bg.xml
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item android:state_pressed="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="#1777e6" /> | ||
<corners android:radius="4dp" /> | ||
</shape> | ||
</item> | ||
|
||
<item android:state_enabled="false"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="#f3f3f3" /> | ||
<corners android:radius="4dp" /> | ||
</shape> | ||
</item> | ||
|
||
<item> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="#1777e6" /> | ||
<corners android:radius="4dp" /> | ||
</shape> | ||
</item> | ||
|
||
</selector> |
6 changes: 6 additions & 0 deletions
6
bl_demo/src/main/res/drawable/shape_hui_hu_btn_loading_bg.xml
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<corners android:radius="4dp" /> | ||
<solid android:color="#1777e6" /> | ||
</shape> |
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,160 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
tools:context=".BailunBtnActivity"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
android:text="汇查查" | ||
android:textColor="@android:color/black" | ||
android:textSize="18sp" /> | ||
|
||
<View | ||
android:layout_width="match_parent" | ||
android:layout_height="1px" | ||
android:background="#eeeeee" /> | ||
|
||
<android.support.constraint.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_huichacha_normal" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_content="normal" | ||
app:layout_constraintEnd_toStartOf="@+id/btn_huichacha_disable" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_huichacha_disable" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_content="disable" | ||
app:bl_btn_enabled="false" | ||
app:layout_constraintBaseline_toBaselineOf="@+id/btn_huichacha_normal" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@+id/btn_huichacha_normal" /> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_huichacha_loading" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_content="loading" | ||
app:bl_btn_loading_bg="@color/colorAccent" | ||
app:bl_btn_style="with_loading" | ||
app:layout_constraintEnd_toStartOf="@+id/btn_huichacha_select" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/btn_huichacha_normal" /> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_huichacha_select" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_content="select" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@+id/btn_huichacha_loading" | ||
app:layout_constraintTop_toBottomOf="@+id/btn_huichacha_normal" /> | ||
</android.support.constraint.ConstraintLayout> | ||
|
||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
android:text="汇乎" | ||
android:textColor="@android:color/black" | ||
android:textSize="18sp" /> | ||
|
||
<View | ||
android:layout_width="match_parent" | ||
android:layout_height="1px" | ||
android:background="#eeeeee" /> | ||
|
||
<android.support.constraint.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_huihu_normal" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_bg="@drawable/selector_huihu_btn_blue_bg" | ||
app:bl_btn_content="normal" | ||
app:bl_tv_color="@color/selector_huihu_btn_blue_tv_color" | ||
app:layout_constraintEnd_toStartOf="@+id/btn_huihu_disable" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_huihu_disable" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_bg="@drawable/selector_huihu_btn_blue_bg" | ||
app:bl_btn_content="normal" | ||
app:bl_btn_enabled="false" | ||
app:bl_tv_color="@color/selector_huihu_btn_blue_tv_color" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@+id/btn_huihu_normal" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_hui_hu_loading" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_bg="@drawable/selector_huihu_btn_blue_bg" | ||
app:bl_btn_content="loading" | ||
app:bl_btn_loading_bg="@drawable/shape_hui_hu_btn_loading_bg" | ||
app:bl_btn_style="with_loading" | ||
app:bl_tv_color="@color/selector_huihu_btn_blue_tv_color" | ||
app:layout_constraintEnd_toStartOf="@+id/btn_hui_hu_pic" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/btn_huihu_normal" /> | ||
|
||
<com.bailun.bl_uilib.BailunButton | ||
android:id="@+id/btn_hui_hu_pic" | ||
android:layout_width="160dp" | ||
android:layout_height="40dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginBottom="8dp" | ||
app:bl_btn_bg="@drawable/selector_huihu_btn_blue_bg" | ||
app:bl_btn_content="pic" | ||
app:bl_btn_loading_bg="@drawable/shape_hui_hu_btn_loading_bg" | ||
app:bl_btn_style="with_image" | ||
app:bl_iv_res="@mipmap/ic_launcher" | ||
app:bl_tv_color="@color/selector_huihu_btn_blue_tv_color" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@+id/btn_hui_hu_loading" | ||
app:layout_constraintTop_toBottomOf="@+id/btn_huihu_normal" /> | ||
</android.support.constraint.ConstraintLayout> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".MainActivity"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
<Button | ||
android:id="@+id/btn_go_to_bailun_btn_demo" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="Hello World!" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
android:text="BailunButton示例" | ||
android:textAllCaps="false" /> | ||
|
||
</android.support.constraint.ConstraintLayout> | ||
</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.