Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kojofosu committed Oct 18, 2021
1 parent c16ad95 commit 92dc6ef
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/src/main/java/com/mcdev/splitbutton/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ class MainActivity : AppCompatActivity() {

splitBtn = findViewById(R.id.split_btn)
splitBtn.apply {
setTextColor(R.color.white)
setTextColor(R.color.black)
setIconColor(android.R.color.white)
setBgColor("#1F51FF")
itemColor = R.color.blue_light
setMenuItems(R.menu.split_menu)
// setMenuItems(listOf(SplitMenu(0, "Merge", R.drawable.ic_calendar), SplitMenu(1, "Rebase", R.drawable.ic_bookmark)))
setBgColor(android.R.color.holo_orange_light)
// itemColor = R.color.blue_light
// setMenuItems(R.menu.split_menu)
setMenuItems(
listOf(
SplitMenu(0, "Merge", R.drawable.ic_merge_git_icon),
SplitMenu(1, "Rebase", R.drawable.git_request_icon)
)
)
setOnButtonClickListener(object : OnButtonClickListener {
override fun onClick(itemId: Int, itemTitle: String?) {
Log.d("TAG", "onClick: id :$itemId")
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/git_request_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="25dp"
android:height="25dp"
android:viewportWidth="768"
android:viewportHeight="1024">
<path
android:fillColor="#FF000000"
android:pathData="M128,64C57.34,64 0,121.34 0,192c0,47.22 25.91,88.06 64,110.28V721.75C25.91,743.94 0,784.75 0,832c0,70.63 57.34,128 128,128s128,-57.38 128,-128c0,-47.25 -25.84,-88.06 -64,-110.25V302.28c38.16,-22.22 64,-63.06 64,-110.28C256,121.34 198.66,64 128,64zM128,896c-35.31,0 -64,-28.63 -64,-64 0,-35.31 28.69,-64 64,-64 35.41,0 64,28.69 64,64C192,867.38 163.41,896 128,896zM128,256c-35.31,0 -64,-28.59 -64,-64s28.69,-64 64,-64c35.41,0 64,28.59 64,64S163.41,256 128,256zM704,721.75V320c0,-192.5 -192,-192 -192,-192h-64V0L256,192l192,192V256c0,0 26.69,0 64,0 56.44,0 64,64 64,64v401.75c-38.13,22.19 -64,62.94 -64,110.25 0,70.63 57.38,128 128,128s128,-57.38 128,-128C768,784.75 742.13,743.94 704,721.75zM640,896c-35.31,0 -64,-28.63 -64,-64 0,-35.31 28.69,-64 64,-64 35.38,0 64,28.69 64,64C704,867.38 675.38,896 640,896z"/>
</vector>
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/ic_merge_git_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="33.333332dp" android:viewportHeight="1024"
android:viewportWidth="768" android:width="25dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M640,448c-47.63,0 -88.63,26.31 -110.63,64.91C523.63,512.5 518,512 512,512c-131.06,0 -255.44,-99.84 -300.81,-223.44C238.47,265.09 256,230.72 256,192c0,-70.66 -57.34,-128 -128,-128S0,121.34 0,192c0,47.22 25.84,88.06 64,110.28V721.75C25.84,743.94 0,784.75 0,832c0,70.63 57.34,128 128,128s128,-57.38 128,-128c0,-47.25 -25.84,-88.06 -64,-110.25V491.47C276.16,580.5 392.38,640 512,640c6.38,0 11.63,-0.44 17.38,-0.63C551.5,677.81 592.5,704 640,704c70.63,0 128,-57.38 128,-128C768,505.34 710.63,448 640,448zM128,896c-35.31,0 -64,-28.63 -64,-64 0,-35.31 28.69,-64 64,-64 35.41,0 64,28.69 64,64C192,867.38 163.41,896 128,896zM128,256c-35.31,0 -64,-28.59 -64,-64s28.69,-64 64,-64c35.41,0 64,28.59 64,64S163.41,256 128,256zM640,640c-35.31,0 -64,-28.63 -64,-64 0,-35.41 28.69,-64 64,-64 35.38,0 64,28.59 64,64C704,611.38 675.38,640 640,640z"/>
</vector>

0 comments on commit 92dc6ef

Please sign in to comment.