android - open Fragment from FragmentActivity class -


i dont know if possible.

i have class extends fragment:

public class usesuser extends fragment { 

and class extends fragmentactivity:

public class uses extends fragmentactivity { 

when button pressed in uses, want open usesuser.

what is:

usesuser newfragment = new usesuser(); fragmenttransaction.hide(fragment); fragmenttransaction.add(r.id.realtabcontent, newfragment); fragmenttransaction.commit(); 

but dont know how fragmenttransaction , fragment.

how can values fragmentactivity class?

you can retrieve fragmenttransaction way:

fragmentmanager manager = getfragmentmanager();  fragmenttransaction fragmenttransaction = manager.begintransaction(); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -