Fragment startActivity - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Fragment startActivity method.

This code example shows how to use the following methods:getActivity, onActivityCreated, startActivity
		return inflater.inflate(R.layout.splash, container, false);
	} 
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		/* Found credentials, forwarding to BrowsingActivity */ 
		SharedPreferences prefs = SettingsActivity.getSettings(getActivity());
		if (prefs.contains("ident")) {
			Intent browseData = new Intent(getActivity(), BrowsingActivity.class);
			String serverUrl = prefs.getString("serverUrl", "");
			browseData.putExtra("url", serverUrl + "/api/getFolderList");
			startActivity(browseData);
		} 
	} 
 
} 
10
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getActivity, onStart, startActivity
	Intent i = null;
	Context context;
	 
	@Override 
	public void onStart() { 
		super.onStart(); 
		context = getActivity(); 
		 
		i = new Intent(context, ScanQR.class);
		startActivity(i);
	} 
 
 
 
	@Override 
	public View onCreateView(LayoutInflater inflater, 
	        ViewGroup container, Bundle savedInstanceState) {
	    super.onCreateView(inflater, container, savedInstanceState);
	    View view = inflater.inflate(R.layout.selection, 
	            container, false);
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getActivity, onOptionsItemSelected, startActivity
        MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
 
    } 
    @Override 
    public boolean onOptionsItemSelected(MenuItem item) {
    	 Intent intent = new Intent(getActivity().getBaseContext(), SettingsActivity.class);
         startActivity(intent);
      return super.onOptionsItemSelected(item);
    } 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getActivity, startActivity
		newBlockButton.setOnClickListener((OnClickListener) this);
	} 
 
	@Override 
	public void onClick(View v) {
		Intent intent = new Intent(getActivity(), NewBlockActivity.class);
		startActivity(intent);
	} 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:startActivity
        return v;
    } 
    @Override 
    public void onClick(View v){
        if (v == amButton){
            startActivity(new Intent(mActivity, DownloaderAnyMemo.class));
        } 
        if (v == feButton){
            startActivity(new Intent(mActivity, FELauncher.class));
        } 
        if (v == ssButton){
            startActivity(new Intent(mActivity, DownloaderSS.class));
        } 
        if (v == quizletButton){
            startActivity(new Intent(mActivity, QuizletLauncher.class));
        } 
        if (v == dropboxButton){
        	startActivity(new Intent(mActivity, DropboxDBListActivity.class));
        } 
        if (v == googleButton) {

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getActivity, startActivity
		return view;
	}; 
 
	@Override 
	public void onUpdateClick(UpdateView view) {
		if (ManifestUtils.getVersionCode(getActivity()) < appModel
				.getAppConfig().getRecentVerCode()) 
			startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(appModel
					.getAppConfig().getUpdateUrl()))); 
	} 
 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getActivity, startActivity
	} 
	 
	 
	 
	public void getFriendListActivity(String s) {
		Intent intent = new Intent(getActivity(), FriendListActivity.class);
//	    intent.putExtra(MOVIE_MESSAGE, s); 
	    startActivity(intent);
	} 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getActivity, startActivity
		return rootView;
	} 
 
	@Override 
	public void onClick(View v) {
		Intent viewOrders = new Intent(getActivity(), OrderIndex.class);
		Bundle dateRequested = new Bundle();
		int month = dateToSearch.getMonth();
		int day = dateToSearch.getDayOfMonth();
		int year = dateToSearch.getYear();
		String theDate = month + "/" + day + "/" + year;
		String engDate = dateconverter.convertMonth(month) + " " + day + " " + year;
		dateRequested.putString("date", theDate);
		dateRequested.putString("engDate", engDate);
		viewOrders.putExtras(dateRequested);
		startActivity(viewOrders);
	} 
 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:startActivity
    public void openCurrentLocationInMaps() { 
        if(mLat != null && mLon != null) {
            try { 
                String location_uri = "geo:" + mLat + "," + mLon + "?z=18&q=" + mLat + "," + mLon;
                Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(location_uri));
                startActivity(intent);
            } catch(Throwable e) {
                Toast.makeText(mActivity, "Error opening Google Maps", Toast.LENGTH_SHORT).show();
            } 
        } else { 
            Toast.makeText(mActivity, "Location could not be found", Toast.LENGTH_SHORT).show();
        } 
    } 
 
    public Double getLatitude() {
        return mLat;
    } 
 
    public Double getLongitude() {
        return mLon;
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:startActivity
	 * @param URL 
	 */ 
	public void openBrowser (String URL) {
		Uri uriUrl = Uri.parse(URL);
		Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl); 
		startActivity(launchBrowser);  
	} 
	 
	/** 
	 * Open the web browser  
	 * @url the url of the page that the browser should open  
	 * @param URL 
	 */ 
	public void openPDF (String URL) {
		Uri uriUrl = Uri.parse("https://docs.google.com/viewer?url="+Uri.parse(URL));
		Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl); 
		startActivity(launchBrowser);  
	} 
 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Fragment startActivity Questions & Answers:

startActivity Method Overview
Call startActivity(Intent) from the fragment's containing Activity.
See Code Examples for other Android Fragment Methods: