-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from ColumbusUtrigas/master
added quick settings launch button with icon
- Loading branch information
Showing
3 changed files
with
143 additions
and
0 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
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/QuickTileService.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,19 @@ | ||
package com.secuso.privacyfriendlycodescanner.qrscanner | ||
|
||
import android.content.Intent | ||
import android.os.Build | ||
import android.service.quicksettings.TileService | ||
import androidx.annotation.RequiresApi | ||
import com.secuso.privacyfriendlycodescanner.qrscanner.ui.activities.ScannerActivity | ||
|
||
@RequiresApi(Build.VERSION_CODES.N) | ||
class QuickTileService : TileService() { | ||
override fun onClick() { | ||
super.onClick() | ||
|
||
val intent = Intent(this, ScannerActivity::class.java) | ||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
|
||
startActivityAndCollapse(intent) | ||
} | ||
} |
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,109 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http://schemas.android.com/aapt" | ||
android:width="108dp" | ||
android:height="108dp" | ||
android:viewportWidth="512" | ||
android:viewportHeight="512"> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M0,0h512v512h-512z" | ||
android:fillColor="#00000000"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M68.577,449.74h169.261V280.479H68.577V449.74zM219.031,430.934H87.384V299.287h131.647V430.934z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M106.191,318.094h94.033v94.033h-94.033z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M68.577,242.866h169.261V73.605H68.577V242.866zM219.031,224.06H87.384V92.413h131.647V224.06z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M106.191,111.219h94.033v94.034h-94.033z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M275.451,449.74h169.261V280.479H275.451V449.74zM425.905,430.934H294.258V299.287h131.647V430.934z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M313.065,318.094h94.033v94.033h-94.033z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M275.451,205.252h37.613v37.614h-37.613z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M275.451,167.639h18.807v18.807h-18.807z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M294.258,148.832h37.613v18.807h-37.613z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M331.871,92.412l0,-18.807l-18.807,0l-18.806,0l-18.807,0l0,18.807l18.807,0l0,37.614l18.806,0l18.807,0l0,-18.807l-18.807,0l0,-18.807z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M369.484,224.059h75.228v18.807h-75.228z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M369.484,186.446l0,-18.807l-18.805,0l0,18.807l-18.808,0l0,56.42l18.808,0l0,-37.613l37.613,0l0,-18.807z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M275.451,130.026h18.807v18.807h-18.807z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M425.905,148.833l-18.807,0l0,18.807l-18.806,0l0,18.805l18.806,0l18.807,0l0,18.807l18.807,0l0,-56.419z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M425.905,73.605l-18.807,0l0,18.808l18.807,0l0,37.612l18.807,0l0,-56.42z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
<group> | ||
<clip-path android:pathData="M0,0h512v512h-512z M 0,0"/> | ||
<path | ||
android:pathData="M388.292,92.412V73.605h-18.808v18.807h-18.806v37.614h-18.808v18.807h18.808h56.419V92.412H388.292zM388.292,130.026h-18.808v-18.807h18.808V130.026z" | ||
android:fillColor="#FFFFFF"/> | ||
</group> | ||
</vector> |