forked from nextcloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NMC-2256: Progress and seek bar customized.
NMC-2041: SwipeRefreshLayout Customized.
- Loading branch information
1 parent
4ecdf79
commit d2b883c
Showing
14 changed files
with
228 additions
and
12 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
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/nmc/android/ui/utils/ProgressBarThemeUtils.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,28 @@ | ||
package com.nmc.android.ui.utils | ||
|
||
import android.widget.ProgressBar | ||
import android.widget.SeekBar | ||
import androidx.annotation.ColorInt | ||
import androidx.core.graphics.BlendModeColorFilterCompat | ||
import androidx.core.graphics.BlendModeCompat | ||
|
||
/** | ||
* theming progress and seek bar for NMC | ||
*/ | ||
object ProgressBarThemeUtils { | ||
|
||
@JvmStatic | ||
fun themeHorizontalSeekBar(seekBar: SeekBar, @ColorInt color: Int) { | ||
themeHorizontalProgressBar(seekBar, color) | ||
seekBar.thumb.colorFilter = | ||
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(color, BlendModeCompat.SRC_IN) | ||
} | ||
|
||
@JvmStatic | ||
fun themeHorizontalProgressBar(progressBar: ProgressBar?, @ColorInt color: Int) { | ||
progressBar?.indeterminateDrawable?.colorFilter = | ||
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(color, BlendModeCompat.SRC_IN) | ||
progressBar?.progressDrawable?.colorFilter = | ||
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(color, BlendModeCompat.SRC_IN) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/nmc/android/utils/SwipeRefreshThemeUtils.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,13 @@ | ||
package com.nmc.android.utils | ||
|
||
import android.content.Context | ||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||
import com.owncloud.android.R | ||
|
||
object SwipeRefreshThemeUtils { | ||
@JvmStatic | ||
fun themeSwipeRefreshLayout(context: Context, swipeRefreshLayout: SwipeRefreshLayout) { | ||
swipeRefreshLayout.setColorSchemeColors(context.resources.getColor(R.color.primary, null)) | ||
swipeRefreshLayout.setProgressBackgroundColorSchemeResource(R.color.refresh_layout_bg_color) | ||
} | ||
} |
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
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
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
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