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

UI transitions animations #1934

Merged
merged 1 commit into from
Oct 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private void createScrollDelegate(Context context, AttributeSet attrs, int defSt
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CustomScrollView, 0, defStyle);
mThumbDrawable = a.getDrawable(R.styleable.CustomScrollView_android_fastScrollThumbDrawable);
if (mThumbDrawable == null) {
mThumbDrawable = getResources().getDrawable(R.drawable.fast_scroll_thumb, getContext().getTheme());
mThumbDrawable = getResources().getDrawable(R.drawable.scrollbar_thumb, getContext().getTheme());
}
mIsAlwaysVisible = a.getBoolean(R.styleable.CustomScrollView_android_fastScrollAlwaysVisible, false);
mThumbDynamicHeight = a.getBoolean(R.styleable.CustomScrollView_dynamicHeight, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ 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 @@ -732,8 +736,6 @@ public void onCanGoBack(GeckoSession aSession, boolean canGoBack) {

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

Expand All @@ -742,8 +744,6 @@ 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
4 changes: 3 additions & 1 deletion app/src/main/res/color/fog_void_tint.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_hovered="true"
android:color="@color/void_color"/> <!-- focused -->
<item android:color="@color/fog"/> <!-- default -->
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/color/library_panel_button_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:color="@color/fog" android:state_pressed="true" />
<item android:color="@color/asphalt" android:state_hovered="true" />
<item android:color="@color/fog" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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: 3 additions & 1 deletion app/src/main/res/color/library_panel_description_color.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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: 3 additions & 1 deletion app/src/main/res/color/library_panel_icon_color.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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: 3 additions & 1 deletion app/src/main/res/color/library_panel_title_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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: 3 additions & 1 deletion app/src/main/res/color/rhino_void_tint.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_hovered="true"
android:color="@color/void_color"/> <!-- focused -->
<item android:color="@color/rhino"/> <!-- default -->
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/color/void_fog_tint.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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,3 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:color="@color/tangerine"/>
</selector>
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/autocompletion_item_background.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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: 3 additions & 1 deletion app/src/main/res/drawable/checkbox.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item
android:drawable="@drawable/ic_button_checkbox_on"
android:state_checked="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="2dp" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="100" android:exitFadeDuration="100">
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_pressed="true">
<shape
android:shape="rectangle">
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/dialog_button_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_pressed="true"
android:color="@color/fog"/>
<item android:state_hovered="true" android:state_pressed="false"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/dialog_close_button_background.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/keyboard_key_rounded_corner"/>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/dialog_close_button_icon_color.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="5dp" />
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/edittext_textcolor.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_selected="true"
android:color="@color/fog" /> <!-- pressed -->
<item android:color="@color/asphalt" /> <!-- default -->
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/empty_drawable.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_hovered="true">
<shape>
</shape>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/fast_scroll_thumb.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item>
<shape>
<size
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/res/drawable/fullscreen_button.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:color="@color/void_color_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/void_color" />
</shape>
</item>
<item android:state_hovered="true" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:color="@color/fog_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/fog" />
</shape>
</item>
<item android:state_hovered="false" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/asphalt" />
</shape>
</item>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/drawable/fullscreen_button_first.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/asphalt" />
<size android:width="20dp" android:height="20dp" />
<corners android:bottomLeftRadius="20dp" android:topLeftRadius="20dp" />
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:color="@color/void_color_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/void_color" />
<size
android:width="20dp"
Expand All @@ -20,6 +24,7 @@
</item>
<item android:state_hovered="true" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:color="@color/fog_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/fog" />
<size
android:width="20dp"
Expand All @@ -31,6 +36,7 @@
</item>
<item android:state_hovered="false" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/asphalt" />
<size
android:width="20dp"
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/drawable/fullscreen_button_last.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/asphalt" />
<size android:width="20dp" android:height="20dp" />
<corners android:bottomRightRadius="20dp" android:topRightRadius="20dp" />
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:color="@color/void_color_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/void_color" />
<size
android:width="20dp"
Expand All @@ -20,6 +24,7 @@
</item>
<item android:state_hovered="true" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:color="@color/fog_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/fog" />
<size
android:width="20dp"
Expand All @@ -31,6 +36,7 @@
</item>
<item android:state_hovered="false" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:color="@color/asphalt_blur" android:width="@dimen/blur_radius" />
<solid android:color="@color/asphalt" />
<size
android:width="20dp"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/fullscreen_button_private.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/eggplant" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/eggplant" />
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/fullscreen_button_private_last.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/eggplant" />
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/ic_icon_empty.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item
android:drawable="@android:color/transparent" />
</selector>
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/ic_icon_language_add.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<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
4 changes: 3 additions & 1 deletion app/src/main/res/drawable/ic_icon_language_delete.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@integer/ui_fadeAnimTime"
android:exitFadeDuration="@integer/ui_fadeAnimTime">
<item android:drawable="@drawable/ic_icon_delete" android:state_hovered="true" />
<item android:drawable="@drawable/ic_icon_delete" android:state_pressed="true" />
<item android:drawable="@android:color/transparent" />
Expand Down
Loading