Android rotate ViewPager Image manually (via button click) without rotating phone -


how rotate viewpager image via button click (say clockwise)? way can set phone portrait , let users rotate image while viewing.

when rotate phone, android redraws activity fit landscape mode. results in 2 instance of activity in application.

now, if have kind of static variable instance class none-static inner class, keep reference activity , prevent gc collect to, causing common memory leak orientation rotation.

to fix this, can either change variable non-static, or inner class static well.

if problem still exist, create heap dump, , trace object's path gc root excluding weak references, in eclipse memory analyser. there great video explaining memory leak in android in 2011 google i/o.


Comments

Popular posts from this blog

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -