Skip to content

Commit

Permalink
Merge pull request #158 from TeamAmaze/feature-147
Browse files Browse the repository at this point in the history
147: change video player and image viewer backgrounds to dark; fix po…
  • Loading branch information
VishalNehra authored Dec 26, 2023
2 parents cdaf186 + f227845 commit 743edce
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 9 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Android Build CI

on:
push:
branches:
- '*'
- '!master'
- '!release/*'
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check_spotless:
name: Check spotless
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11
- name: Check formatting using spotless
uses: gradle/[email protected]
with:
arguments: spotlessCheck
build:
name: Build debug
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: assembledebug --stacktrace
env:
TZ: UTC
2 changes: 1 addition & 1 deletion .github/workflows/android-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: assembledebug
arguments: assembledebug --stacktrace
env:
TZ: UTC
- name: Publish on Telegram
Expand Down
9 changes: 2 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
android:theme="@style/Theme.AmazeFileUtilities"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity"
android:launchMode="singleInstance"
>
<nav-graph android:value="@navigation/mobile_navigation" />
<intent-filter>
Expand Down Expand Up @@ -96,7 +95,6 @@
android:name=".image_viewer.ImageViewerActivity"
android:label="@string/image_viewer"
android:theme="@style/Theme.AmazeFileUtilities.FullScreen.Dark"
android:launchMode="singleInstance"
android:exported="true"
>
<intent-filter
Expand All @@ -114,7 +112,6 @@
android:name=".image_viewer.editor.EditImageActivity"
android:label="@string/image_editor"
android:theme="@style/Theme.AmazeFileUtilities.FullScreen.Dark"
android:launchMode="singleInstance"
android:exported="true"
>
<intent-filter
Expand Down Expand Up @@ -161,7 +158,6 @@
android:label="@string/video_player"
android:supportsPictureInPicture="true"
android:resizeableActivity="true"
android:launchMode="singleInstance"
android:taskAffinity="com.amaze.fileutilitiespip"
android:theme="@style/Theme.AmazeFileUtilities.FullScreen.Dark"
android:exported="true">
Expand Down Expand Up @@ -198,7 +194,7 @@
android:exported="true"
android:label="@string/docx_viewer"
android:theme="@style/Theme.AmazeFileUtilities"
android:launchMode="singleInstance">
>
<intent-filter
android:label="@string/docx_viewer"
tools:ignore="AppLinkUrlError">
Expand All @@ -214,7 +210,7 @@
android:name=".home_page.ui.options.AboutActivity"
android:exported="true"
android:theme="@style/Custom.Dialog.Dark"
android:launchMode="singleInstance">
>
</activity>

<activity android:name="com.amaze.fileutilities.crash_report.ErrorActivity"
Expand All @@ -229,7 +225,6 @@
android:theme="@style/Theme.AmazeFileUtilities.Dark"
android:configChanges=""
android:label="@string/settings"
android:launchMode="singleInstance"
android:exported="true"
/>
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package com.amaze.fileutilities.home_page.ui.analyse

import android.content.Intent
import android.content.SharedPreferences
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.os.Handler
Expand Down Expand Up @@ -482,6 +483,7 @@ class AnalyseFragment : AbstractMediaFileInfoOperationsFragment() {
if (!isUsageStatsPermissionGranted()) {
unusedAppsPreview.loadRequireElevatedPermission({
val intent = Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS)
intent.data = Uri.parse("package:${requireActivity().packageName}")
startActivity(intent)
}, {
reloadFragment()
Expand All @@ -508,12 +510,14 @@ class AnalyseFragment : AbstractMediaFileInfoOperationsFragment() {
if (!isUsageStatsPermissionGranted()) {
mostUsedAppsPreview.loadRequireElevatedPermission({
val intent = Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS)
intent.data = Uri.parse("package:${requireActivity().packageName}")
startActivity(intent)
}, {
reloadFragment()
})
leastUsedAppsPreview.loadRequireElevatedPermission({
val intent = Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS)
intent.data = Uri.parse("package:${requireActivity().packageName}")
startActivity(intent)
}, {
reloadFragment()
Expand Down Expand Up @@ -556,6 +560,7 @@ class AnalyseFragment : AbstractMediaFileInfoOperationsFragment() {
) {
networkIntensiveAppsPreview.loadRequireElevatedPermission({
val intent = Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS)
intent.data = Uri.parse("package:${requireActivity().packageName}")
startActivity(intent)
}, {
reloadFragment()
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_curved_selected.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<solid android:color="@color/white"/>
<stroke android:width="0dp" android:color="#B1BCBE" />
<corners android:radius="@dimen/material_generic"/>
<padding android:left="@dimen/eight_dp" android:top="0dp" android:right="@dimen/eight_dp" android:bottom="0dp" />
<!-- <padding android:left="@dimen/eight_dp" android:top="0dp" android:right="@dimen/eight_dp" android:bottom="0dp" />-->
</shape>
</item>
<item android:drawable="@drawable/ripple_curved_16" />
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/popup_item_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:shape="rectangle">
<corners
android:topLeftRadius="@dimen/material_generic"
android:topRightRadius="@dimen/material_generic"
android:bottomLeftRadius="@dimen/material_generic"
android:bottomRightRadius="@dimen/material_generic"
/>
<solid android:color="@color/navy_blue_alt" />
</shape>
</item>
<item android:drawable="@drawable/ripple_curved_16_trans_70" />
</layer-list>
17 changes: 17 additions & 0 deletions app/src/main/res/drawable/ripple_curved_16_trans_70.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="@color/highlight_yellow_70"
tools:targetApi="lollipop">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/highlight_yellow_70" />
<!-- <corners android:radius="@dimen/round_corner" />-->
<corners
android:topLeftRadius="@dimen/material_generic"
android:topRightRadius="@dimen/material_generic"
android:bottomLeftRadius="@dimen/material_generic"
android:bottomRightRadius="@dimen/material_generic"
/>
</shape>
</item>
</ripple>
1 change: 1 addition & 0 deletions app/src/main/res/values-v27/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<item name="android:windowLayoutInDisplayCutoutMode">always</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@color/black</item>
</style>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<style name="Theme.AmazeFileUtilities.FullScreen.Dark" parent="Theme.AmazeFileUtilities.Dark">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@color/black</item>
</style>

<style name="BottomNavigationTheme" parent="Theme.AppCompat.Light">
Expand All @@ -86,6 +87,8 @@
<item name="android:textColor">@color/white</item>
<item name="popupMenuBackground">@drawable/popup_background</item>
<item name="android:gravity">center_vertical</item>
<item name="android:itemBackground">@drawable/popup_item_background</item>
<item name="itemBackground">@drawable/popup_item_background</item>
</style>

<style name="Custom.Dialog.Dark" parent="Theme.AppCompat.Dialog.Alert">
Expand Down

0 comments on commit 743edce

Please sign in to comment.