Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Casanowow Life for love
VLC-Android
Commits
06b11389
Commit
06b11389
authored
Jun 27, 2012
by
Ludovic Fauvet
Browse files
Add a little easter egg in the about activity
parent
51fa5470
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlc-android/res/layout/about_main.xml
View file @
06b11389
...
...
@@ -20,6 +20,7 @@
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/logo"
android:layout_width=
"80dp"
android:layout_height=
"fill_parent"
android:contentDescription=
"@string/info"
...
...
vlc-android/src/org/videolan/vlc/gui/AboutMainFragment.java
View file @
06b11389
...
...
@@ -28,7 +28,13 @@ import android.support.v4.app.Fragment;
import
android.text.Html
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View.OnClickListener
;
import
android.view.ViewGroup
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationSet
;
import
android.view.animation.DecelerateInterpolator
;
import
android.view.animation.RotateAnimation
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
public
class
AboutMainFragment
extends
Fragment
{
...
...
@@ -50,6 +56,19 @@ public class AboutMainFragment extends Fragment {
TextView
textview_rev
=
(
TextView
)
v
.
findViewById
(
R
.
id
.
main_revision
);
textview_rev
.
setText
(
getResources
().
getString
(
R
.
string
.
revision
)
+
" "
+
revision
+
" ("
+
builddate
+
")"
);
final
ImageView
logo
=
(
ImageView
)
v
.
findViewById
(
R
.
id
.
logo
);
logo
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
AnimationSet
anim
=
new
AnimationSet
(
true
);
RotateAnimation
rotate
=
new
RotateAnimation
(
0
f
,
360
f
,
Animation
.
RELATIVE_TO_SELF
,
0.5f
,
Animation
.
RELATIVE_TO_SELF
,
0.5f
);
rotate
.
setDuration
(
800
);
rotate
.
setInterpolator
(
new
DecelerateInterpolator
());
anim
.
addAnimation
(
rotate
);
logo
.
startAnimation
(
anim
);
}
});
return
v
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment