java - Open the Google-drive Application with floating button pressed -
i have button in fragment when use press opens screen google drive screen. in other words opens google drive simply.
but need screen in can see floating button or plus button pressed.
here code of java file
public class threefragment extends fragment{ public threefragment() { // required empty public constructor } @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // inflate layout fragment view rootview = inflater.inflate(r.layout.fragment_three, container, false); button b1 = (button) rootview.findviewbyid(r.id.managecloud); b1.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent intent = new intent(); intent.setaction(intent.action_main); intent.addcategory(intent.category_launcher); intent.setcomponent(new componentname("com.google.android.apps.docs", "com.google.android.apps.docs.app.newmainproxyactivity")); try { startactivity(intent); }catch (exception e){ toast.maketext(getcontext(), "error: "+e, toast.length_long).show(); } } }); return rootview; } }
Comments
Post a Comment