-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Splash Screen, Login Screen, and Scanner Screen along with Ho…
…me Page changes
- Loading branch information
1 parent
29dd16b
commit b089f98
Showing
21 changed files
with
454 additions
and
65 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
29 changes: 29 additions & 0 deletions
29
app/src/main/java/org/hackillinois/android/view/scanner/buttons/BurntBrownAnimatedButton.kt
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,29 @@ | ||
package org.hackillinois.android.view.scanner.buttons | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.MotionEvent | ||
import org.hackillinois.android.R | ||
|
||
class BurntBrownAnimatedButton : androidx.appcompat.widget.AppCompatButton { | ||
constructor(context: Context?) : super(context!!) {} | ||
constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {} | ||
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context!!, attrs, defStyle) { | ||
} | ||
|
||
override fun onTouchEvent(event: MotionEvent?): Boolean { | ||
if (event != null) { | ||
val scale = resources.displayMetrics.density | ||
val dpAsPixels20 = (20 * scale + 0.5f).toInt() | ||
val dpAsPixels30 = (30 * scale + 0.5f).toInt() | ||
if (event.action == MotionEvent.ACTION_DOWN) { | ||
setPadding(0, dpAsPixels30, 0, dpAsPixels20) | ||
setBackgroundResource(R.drawable.burntbrown_scanner_button_pressed) | ||
} else if (event.action == MotionEvent.ACTION_UP || event.action == MotionEvent.ACTION_CANCEL) { | ||
setPadding(0, dpAsPixels20, 0, dpAsPixels30) | ||
setBackgroundResource(R.drawable.burntbrown_scanner_button) | ||
} | ||
} | ||
return super.onTouchEvent(event) | ||
} | ||
} |
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,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<!-- Bottom Shadow --> | ||
<item> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/burntBrownBorder" /> | ||
<corners android:radius="20dp" /> | ||
</shape> | ||
</item> | ||
|
||
<!-- Button Color --> | ||
<item android:bottom="8dp"> | ||
<shape android:shape="rectangle"> | ||
<stroke android:color="@color/burntBrownBorder" android:width="4dp" /> | ||
|
||
<solid android:color="@color/burntBrown" /> | ||
<corners android:radius="15dp" /> | ||
|
||
|
||
</shape> | ||
|
||
</item> | ||
|
||
|
||
</layer-list> |
17 changes: 17 additions & 0 deletions
17
app/src/main/res/drawable/burntbrown_scanner_button_pressed.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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<!-- Button Color --> | ||
<item android:top="8dp"> | ||
<shape android:shape="rectangle"> | ||
<stroke android:color="@color/burntBrownBorder" android:width="4dp" /> | ||
<solid android:color="@color/burntBrown" /> | ||
<corners android:radius="15dp" /> | ||
|
||
|
||
</shape> | ||
|
||
</item> | ||
|
||
|
||
</layer-list> |
Oops, something went wrong.