Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Revert UI animations (#2380)
Browse files Browse the repository at this point in the history
* Revert all UI ease animations

* Moved hiding library panels to onPageStart
  • Loading branch information
keianhzo authored and MortimerGoro committed Nov 26, 2019
1 parent e6f5e2b commit 1cc152f
Show file tree
Hide file tree
Showing 95 changed files with 122 additions and 318 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ private void initialize(@NonNull Context aContext) {

mPrefs = PreferenceManager.getDefaultSharedPreferences(mAppContext);
mPrefs.registerOnSharedPreferenceChangeListener(this);

for (CustomUIButton button : mButtons) {
button.setPrivateMode(true);
}
}

@Override
Expand Down Expand Up @@ -781,10 +777,10 @@ public void onLocationChange(GeckoSession session, String url) {
@Override
public void onCanGoBack(GeckoSession aSession, boolean canGoBack) {
if (mBackButton != null) {
boolean enableBackButton = getSession().canGoBack();

Log.d(LOGTAG, "Got onCanGoBack: " + (enableBackButton ? "true" : "false"));
mBackButton.setEnabled(enableBackButton);
Log.d(LOGTAG, "Got onCanGoBack: " + (canGoBack ? "true" : "false"));
mBackButton.setEnabled(canGoBack);
mBackButton.setHovered(false);
mBackButton.setClickable(canGoBack);
}
}

Expand All @@ -793,6 +789,8 @@ public void onCanGoForward(GeckoSession aSession, boolean canGoForward) {
if (mForwardButton != null) {
Log.d(LOGTAG, "Got onCanGoForward: " + (canGoForward ? "true" : "false"));
mForwardButton.setEnabled(canGoForward);
mForwardButton.setHovered(false);
mForwardButton.setClickable(canGoForward);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,14 @@ public void onVideoAvailabilityChanged(boolean aVideosAvailable) {
@Override
public void onPageStart(@NonNull GeckoSession geckoSession, @NonNull String s) {
mCaptureOnPageStop = true;

if (isHistoryVisible()) {
hideHistory();
}

if (isBookmarksVisible()) {
hideBookmarks();
}
}

@Override
Expand All @@ -1573,22 +1581,6 @@ public void captureImage() {
mSession.captureBitmap();
}

// GeckoSession.NavigationDelegate

@Nullable
@Override
public GeckoResult<AllowOrDeny> onLoadRequest(@NonNull GeckoSession geckoSession, @NonNull LoadRequest loadRequest) {
if (isHistoryVisible()) {
hideHistory();
}

if (isBookmarksVisible()) {
hideBookmarks();
}

return GeckoResult.ALLOW;
}

@Override
public void onLocationChange(@NonNull GeckoSession session, @Nullable String url) {
updateTitleBarUrl(url);
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/color/fog_void_tint.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_hovered="true"
android:color="@color/void_color"/> <!-- focused -->
<item android:color="@color/fog"/> <!-- default -->
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/color/library_panel_button_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/rhino" android:state_enabled="false" />
<item android:color="@color/fog" android:state_pressed="true" />
<item android:color="@color/asphalt" android:state_hovered="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@color/fog"/>
<item android:state_hovered="true" android:color="@color/asphalt"/>
<item android:color="@color/fog"/>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/color/library_panel_description_color.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@color/fog"/>
<item android:state_hovered="true" android:color="@color/asphalt"/>
<item android:color="@color/concrete"/>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/color/library_panel_icon_color.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@color/void_color"/>
<item android:state_hovered="true" android:color="@color/smoke"/>
<item android:color="@color/concrete"/>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/color/library_panel_title_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@color/fog"/>
<item android:state_hovered="true" android:color="@color/fog"/>
<item android:color="@color/fog"/>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/color/rhino_void_tint.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_hovered="true"
android:color="@color/void_color"/> <!-- focused -->
<item android:color="@color/rhino"/> <!-- default -->
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/color/void_fog_tint.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_hovered="true"
android:color="@color/fog"/> <!-- focused -->
<item android:color="@color/void_color"/> <!-- default -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tangerine"/>
</selector>
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/autocompletion_item_background.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/void_color"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:topLeftRadius="@dimen/keyboard_key_rounded_corner" android:bottomLeftRadius="@dimen/keyboard_key_rounded_corner"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:topRightRadius="@dimen/keyboard_key_rounded_corner" android:bottomRightRadius="@dimen/keyboard_key_rounded_corner"/>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/checkbox.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/ic_button_checkbox_on"
android:state_checked="true"
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/content_panel_button_background.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<corners android:radius="2dp" />
Expand All @@ -26,4 +24,4 @@
<stroke android:width="1pt" android:color="@color/fog" />
</shape>
</item>
</animated-selector>
</selector>
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape
android:shape="rectangle">
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/dialog_button_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:color="@color/fog"/>
<item android:state_hovered="true" android:state_pressed="false"
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/dialog_close_button_background.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/keyboard_key_rounded_corner"/>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/dialog_close_button_icon_color.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/void_color"/>
<item android:state_pressed="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="5dp" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="5dp" />
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/edittext_textcolor.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true"
android:color="@color/fog" /> <!-- pressed -->
<item android:color="@color/asphalt" /> <!-- default -->
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/empty_drawable.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_hovered="true">
<shape>
</shape>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/fast_scroll_thumb.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<size
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/fullscreen_button.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:color="@color/void_color_blur" android:width="@dimen/blur_radius" />
Expand All @@ -20,4 +18,4 @@
<solid android:color="@color/asphalt" />
</shape>
</item>
</animated-selector>
</selector>
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/fullscreen_button_first.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
Expand Down Expand Up @@ -46,4 +44,4 @@
android:bottomLeftRadius="20dp"/>
</shape>
</item>
</animated-selector>
</selector>
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/fullscreen_button_last.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
Expand Down Expand Up @@ -46,4 +44,4 @@
android:bottomRightRadius="20dp"/>
</shape>
</item>
</animated-selector>
</selector>
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/fullscreen_button_private.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/eggplant" />
Expand All @@ -22,4 +20,4 @@
<solid android:color="@color/eggplant" />
</shape>
</item>
</animated-selector>
</selector>
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/fullscreen_button_private_first.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/eggplant" />
Expand Down Expand Up @@ -42,4 +40,4 @@
android:bottomLeftRadius="20dp"/>
</shape>
</item>
</animated-selector>
</selector>
6 changes: 2 additions & 4 deletions app/src/main/res/drawable/fullscreen_button_private_last.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/eggplant" />
Expand Down Expand Up @@ -30,4 +28,4 @@
<corners android:bottomRightRadius="20dp" android:topRightRadius="20dp" />
</shape>
</item>
</animated-selector>
</selector>
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/ic_icon_empty.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@android:color/transparent" />
</selector>
4 changes: 1 addition & 3 deletions app/src/main/res/drawable/ic_icon_language_add.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_icon_add" android:state_hovered="true" />
<item android:drawable="@drawable/ic_icon_add" android:state_pressed="true" />
<item android:drawable="@android:color/transparent" />
Expand Down
Loading

0 comments on commit 1cc152f

Please sign in to comment.