KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
First of all thanks everyone who tries to reply this topic. I have an activity and I wanted to show a sort of menu at the top of the screen and I used windowmanager to handle this. it was about UI issues I encountered why I choise windowmanager to do such a menu. But for now I want this menu to animate but it seems animation takes no effect. Here is my code. If anyone has any idea how to animate windowmanager I ll be appreciate. Animation animShowTopLine; animShowTopLine = AnimationUtils.loadAnimation(this, R.anim.translate); animShowTopLine.reset(); LinearLayout top_line; WindowManager wm; WindowManager.LayoutParams wmParams; LayoutInflater inflate = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); top_line = (LinearLayout) inflate.inflate(R.layout.line, null); wm =(WindowManager) getApplicationContext().getSystemService("window"); wmParams =new WindowManager.LayoutParams(); wmParams.type=2002; wmParams.format = 1; wmParams.flags=40; wmParams.width=WindowManager.LayoutParams.FILL_PARENT; wmParams.height=WindowManager.LayoutParams.WRAP_CONTENT; wmParams.gravity = Gravity.TOP; wm.addView(top_line, wmParams); top_line.startAnimation(animShowTopLine); Thanks in advance. Regards.
Tags (comma-separated)
Save Edits
Cancel