Skip to content

Commit

Permalink
Merge pull request #27000 from brave/remove_animations_open_yt_dialog
Browse files Browse the repository at this point in the history
Remove animations open yt dialog
  • Loading branch information
deeppandya authored Dec 18, 2024
2 parents f4a62aa + f09c28a commit 051b932
Show file tree
Hide file tree
Showing 10 changed files with 306 additions and 19 deletions.
2 changes: 0 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ if (is_android) {
android_assets("brave_file_assets") {
sources = [
"//brave/LICENSE.html",
"//brave/android/java/org/chromium/chrome/browser/lottie_animations/moving_ads_dark.json",
"//brave/android/java/org/chromium/chrome/browser/lottie_animations/moving_ads_light.json",
"//brave/android/java/org/chromium/chrome/browser/ntp/ntp_news_optin_icon_animation.json",
"//brave/android/java/org/chromium/chrome/browser/onboarding/animations/onboarding_ads.json",
"//brave/android/java/org/chromium/chrome/browser/onboarding/animations/onboarding_ads_notification.json",
Expand Down
2 changes: 2 additions & 0 deletions android/brave_java_resources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ brave_java_resources = [
"java/res/drawable-night/ic_vpn_always_on_1.xml",
"java/res/drawable-night/ic_vpn_always_on_2.xml",
"java/res/drawable-night/ic_vpn_always_on_3.xml",
"java/res/drawable-night/ic_youtube_skip_ads.xml",
"java/res/drawable-night/incognito_history_placeholder_image.xml",
"java/res/drawable-night/new_wallet.xml",
"java/res/drawable-night/phone_recent_tab_empty_state_illustration.xml",
Expand Down Expand Up @@ -621,6 +622,7 @@ brave_java_resources = [
"java/res/drawable/ic_warning_triangle_outline.xml",
"java/res/drawable/ic_web.xml",
"java/res/drawable/ic_widget_generic.xml",
"java/res/drawable/ic_youtube_skip_ads.xml",
"java/res/drawable/image_credit_rounded_shape.xml",
"java/res/drawable/info_outline.xml",
"java/res/drawable/leo_plan_active_bg.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
import android.widget.Button;
import android.widget.TextView;

import com.airbnb.lottie.LottieAnimationView;

import org.chromium.chrome.R;
import org.chromium.chrome.browser.night_mode.GlobalNightModeStateProviderHolder;
import org.chromium.chrome.browser.preferences.BravePrefServiceBridge;
import org.chromium.chrome.browser.util.TabUtils;

Expand All @@ -37,14 +34,6 @@ public void onViewCreated(View view, Bundle savedInstanceState) {

TextView mIgnoreButton = view.findViewById(R.id.btn_ignore);
mIgnoreButton.setOnClickListener(this);

LottieAnimationView mAnimatedView = view.findViewById(R.id.animation_view);
String animationFile =
GlobalNightModeStateProviderHolder.getInstance().isInNightMode()
? "moving_ads_dark.json"
: "moving_ads_light.json";
mAnimatedView.setAnimation(animationFile);
mAnimatedView.playAnimation();
}

@Override
Expand Down

This file was deleted.

This file was deleted.

148 changes: 148 additions & 0 deletions android/java/res/drawable-night/ic_youtube_skip_ads.xml

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions android/java/res/drawable/ic_youtube_skip_ads.xml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions android/java/res/layout/fragment_open_yt_in_brave_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/open_yt_dialog_bg"
android:paddingTop="32dp"
android:paddingBottom="16dp"
android:paddingHorizontal="24dp"
android:orientation="vertical">

<com.airbnb.lottie.LottieAnimationView
android:id="@+id/animation_view"
<ImageView
android:layout_width="130dp"
android:layout_height="92dp"
android:gravity="center"
android:contentDescription="@null"
android:adjustViewBounds="true"
android:layout_gravity="center_horizontal"
app:lottie_loop="true" />
app:srcCompat="@drawable/ic_youtube_skip_ads"
android:layout_gravity="center_horizontal" />

<TextView
android:layout_width="match_parent"
Expand Down
2 changes: 2 additions & 0 deletions android/java/res/values-night/brave_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,6 @@
<color name="schemes_primary">#c1c4ff</color>
<color name="schemes_surface_container_highest">#303034</color>
<color name="text_interactive">#7c91ff</color>

<color name="open_yt_dialog_bg">#000000</color>
</resources>
2 changes: 2 additions & 0 deletions android/java/res/values/brave_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,6 @@
<color name="schemes_outline_variant">#e3e3e8</color>
<color name="schemes_primary">#3e37d4</color>
<color name="schemes_surface_container_highest">#c7c7cc</color>

<color name="open_yt_dialog_bg">#FFFFFF</color>
</resources>

0 comments on commit 051b932

Please sign in to comment.