Example usage for android.content Intent EXTRA_TITLE

List of usage examples for android.content Intent EXTRA_TITLE

Introduction

In this page you can find the example usage for android.content Intent EXTRA_TITLE.

Prototype

String EXTRA_TITLE

To view the source code for android.content Intent EXTRA_TITLE.

Click Source Link

Document

A CharSequence dialog title to provide to the user when used with a #ACTION_CHOOSER .

Usage

From source file:net.abcdroid.devfest12.ui.phone.MapActivity.java

@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
    try {/*from   w w w . ja  v a 2s. c o m*/
        if (!cursor.moveToFirst()) {
            return;
        }

        Intent roomIntent = new Intent(Intent.ACTION_VIEW,
                ScheduleContract.Rooms.buildSessionsDirUri(cursor.getString(RoomsQuery.ROOM_ID)));
        roomIntent.putExtra(Intent.EXTRA_TITLE, cursor.getString(RoomsQuery.ROOM_NAME));
        startActivity(roomIntent);

    } finally {
        cursor.close();
    }
}

From source file:org.deviceconnect.android.client.fragment.TextDialogFragment.java

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
        final Bundle savedInstanceState) {
    mLogger.entering(getClass().getName(), "onCreateView",
            new Object[] { inflater, container, savedInstanceState });

    View view = inflater.inflate(R.layout.fragment_privacypolicy, null);
    TextView text = (TextView) view.findViewById(android.R.id.text1);

    InputStream is = null;//from   ww  w. j a v a2  s . co  m
    try {
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        is = getActivity().getResources().openRawResource(getArguments().getInt(Intent.EXTRA_TEXT));
        byte[] buf = new byte[BUFFER_SIZE];
        while (true) {
            int len = is.read(buf);
            if (len < 0) {
                break;
            }
            os.write(buf, 0, len);
        }
        text.setText(new String(os.toByteArray(), HTTP.UTF_8));
    } catch (IOException e) {
        mLogger.warning(e.toString());
    } finally {
        if (is != null) {
            try {
                is.close();
            } catch (IOException e) {
                mLogger.fine(e.toString());
            }
        }
    }

    getDialog().setTitle(getArguments().getInt(Intent.EXTRA_TITLE));

    mLogger.exiting(getClass().getName(), "onCreateView", view);
    return view;
}

From source file:com.skynet.dwhsu.cinema_browser.ui.MovieDetailActivity.java

@TargetApi(VERSION_CODES.HONEYCOMB)
@Override/*from  ww w.  ja v a 2 s.  co m*/
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.movie_detail_activity);
    final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    //mMovieId = getIntent().getStringExtra(Intent.EXTRA_TEXT);
    //Toast.makeText(getApplicationContext(),mMovieId,Toast.LENGTH_SHORT).show();
    if (savedInstanceState == null) {
        Fragment fragment = new MovieDetailFragment();
        Bundle args = new Bundle();
        args.putBoolean("hasData", true);
        args.putString("movieId", getIntent().getStringExtra(Intent.EXTRA_TITLE));
        args.putString("movieLink", getIntent().getStringExtra(Intent.EXTRA_TEXT));
        fragment.setArguments(args);
        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction transaction = fm.beginTransaction();
        //transaction.replace(R.id.movieGridFragment, fragment);
        transaction.add(R.id.movieDetailFragment, fragment);
        transaction.commit();
    }
}

From source file:org.deviceconnect.android.client.fragment.DrawerListFragment.java

/**
 * ?.//  ww w  .j a  v  a  2 s . c om
 * @param data 
 */
public void setDataList(final List<? extends Object> data) {

    mListAdapter.clear();

    if (data != null && data.size() > 0) {

        List<String> titleList = new ArrayList<String>();
        for (Object obj : data) {
            if (obj instanceof Fragment && ((Fragment) obj).getArguments() != null) {
                titleList.add(((Fragment) obj).getArguments().getString(Intent.EXTRA_TITLE, obj.toString()));
            } else {
                titleList.add(obj.toString());
            }
        }
        mListAdapter.addAll(titleList);
        mListAdapter.notifyDataSetChanged();

    }

}

From source file:de.j4velin.encrypter.EncryptedFragment.java

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
        final Bundle savedInstanceState) {
    RecyclerView recyclerView = (RecyclerView) inflater.inflate(R.layout.fragment_filelist, container, false);
    Database db = new Database(getContext());
    adapter = new FileAdapter(getContext(), new FileAdapter.ClickListener() {
        @Override/* ww w  .  ja  va2  s . c o m*/
        public void click(final File file) {
            selectedFile = file;
            Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
            intent.addCategory(Intent.CATEGORY_OPENABLE);
            intent.setType(selectedFile.mime);
            intent.putExtra(Intent.EXTRA_TITLE, selectedFile.name);
            EncryptedFragment.this.startActivityForResult(intent, REQUEST_OUTPUT);
        }
    }, new FileAdapter.DeleteListener() {
        @Override
        public boolean delete(final File file) {
            java.io.File f = new java.io.File(file.uri.getPath());
            if (!f.exists() || f.delete()) {
                Database db = new Database(getContext());
                db.deleteFile(file.id);
                db.close();
                return true;
            } else {
                return false;
            }
        }
    }, db.getFiles());
    db.close();
    recyclerView.setHasFixedSize(true);
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    recyclerView.setAdapter(adapter);
    return recyclerView;
}

From source file:org.androidtitlan.estoesgoogle.ui.DashboardFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View root = inflater.inflate(R.layout.fragment_dashboard, container);

    // Attach event handlers
    root.findViewById(R.id.home_btn_schedule).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Schedule");
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), ScheduleMultiPaneActivity.class));
            } else {
                startActivity(new Intent(getActivity(), ScheduleActivity.class));
            }/*from w w w  .  jav  a2  s .com*/

        }

    });

    root.findViewById(R.id.home_btn_sessions).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Sessions");
            // Launch sessions list
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), SessionsMultiPaneActivity.class));
            } else {
                final Intent intent = new Intent(Intent.ACTION_VIEW, ScheduleContract.Tracks.CONTENT_URI);
                intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_session_tracks));
                intent.putExtra(TracksFragment.EXTRA_NEXT_TYPE, TracksFragment.NEXT_TYPE_SESSIONS);
                startActivity(intent);
            }

        }
    });

    root.findViewById(R.id.home_btn_starred).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Starred");
            // Launch list of sessions and vendors the user has starred
            startActivity(new Intent(getActivity(), StarredActivity.class));
        }
    });

    root.findViewById(R.id.home_btn_map).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            // Launch map of conference venue
            fireTrackerEvent("Map");
            startActivity(new Intent(getActivity(), UIUtils.getMapActivityClass(getActivity())));
        }
    });

    return root;
}

From source file:com.ibox_ucsc.design.ui.DashboardFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View root = inflater.inflate(R.layout.fragment_dashboard, container);

    // Attach event handlers
    root.findViewById(R.id.home_btn_schedule).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Schedule");
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), ScheduleMultiPaneActivity.class));
            } else {
                startActivity(new Intent(getActivity(), ScheduleActivity.class));
            }/*from  w w  w. jav  a 2  s . com*/

        }

    });

    root.findViewById(R.id.home_btn_sessions).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Sessions");
            // Launch sessions list
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), SessionsMultiPaneActivity.class));
            } else {
                final Intent intent = new Intent(Intent.ACTION_VIEW, ScheduleContract.Tracks.CONTENT_URI);
                intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_session_tracks));
                intent.putExtra(TracksFragment.EXTRA_NEXT_TYPE, TracksFragment.NEXT_TYPE_SESSIONS);
                startActivity(intent);
            }

        }
    });

    root.findViewById(R.id.home_btn_starred).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Starred");
            // Launch list of sessions and vendors the user has starred
            startActivity(new Intent(getActivity(), StarredActivity.class));
        }
    });

    root.findViewById(R.id.home_btn_vendors).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Sandbox");
            // Launch vendors list
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), VendorsMultiPaneActivity.class));
            } else {
                final Intent intent = new Intent(Intent.ACTION_VIEW, ScheduleContract.Tracks.CONTENT_URI);
                intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_vendor_tracks));
                intent.putExtra(TracksFragment.EXTRA_NEXT_TYPE, TracksFragment.NEXT_TYPE_VENDORS);
                startActivity(intent);
            }
        }
    });

    root.findViewById(R.id.home_btn_map).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            // Launch map of conference venue
            fireTrackerEvent("Map");

            // must be modified to call MapActivity instead

            startActivity(new Intent(getActivity(), UIUtils.getMapActivityClass(getActivity())));
        }
    });

    root.findViewById(R.id.home_btn_announcements).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            // splicing in tag streamer
            fireTrackerEvent("Bulletin");
            Intent intent = new Intent(getActivity(), BulletinActivity.class);
            startActivity(intent);
        }
    });

    return root;
}

From source file:net.peterkuterna.android.apps.devoxxsched.ui.DashboardFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View root = inflater.inflate(R.layout.fragment_dashboard, container);

    // Attach event handlers
    root.findViewById(R.id.home_btn_schedule).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Schedule");
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), ScheduleMultiPaneActivity.class));
            } else {
                startActivity(new Intent(getActivity(), ScheduleActivity.class));
            }// ww  w  .j a va2s .c  om

        }

    });

    root.findViewById(R.id.home_btn_sessions).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Sessions");
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), SessionsMultiPaneActivity.class));
            } else {
                final Intent intent = new Intent(Intent.ACTION_VIEW, CfpContract.Tracks.CONTENT_URI);
                intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_session_tracks));
                startActivity(intent);
            }

        }
    });

    root.findViewById(R.id.home_btn_starred).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Starred");
            startActivity(new Intent(getActivity(), StarredActivity.class));
        }
    });

    root.findViewById(R.id.home_btn_speakers).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Speakers");
            startActivity(new Intent(getActivity(), SpeakersActivity.class));
        }
    });

    root.findViewById(R.id.home_btn_map).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Map");
            startActivity(new Intent(getActivity(), MapActivity.class));
        }
    });

    root.findViewById(R.id.home_btn_announcements).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Bulletin");
            Intent intent = new Intent(getActivity(), BulletinActivity.class);
            startActivity(intent);
        }
    });

    return root;
}

From source file:app.morningsignout.com.morningsignoff.MainActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d("onCreate", "at onCreate");

    Log.e("MainPageFragment", "category_category");
    Intent categoryPageIntent = new Intent(this, CategoryActivity.class);
    //categoryPageIntent.putExtra(Intent.EXTRA_TITLE, stringAdapter.getItem(position));

    categoryPageIntent.putExtra(Intent.EXTRA_TITLE, 0);
    startActivity(categoryPageIntent);/*from   ww w . ja  v  a  2s.co m*/

    setContentView(R.layout.activity_main);

    // The pager for list of headline images (each is own page)
    ViewPager headlinePager = (ViewPager) findViewById(R.id.container_headline);
    headlinePager.setAdapter(new HeadlinePagerAdapter(getSupportFragmentManager()));

    // Bottom half of screen: The list of category buttons
    if (savedInstanceState == null) {
        getSupportFragmentManager().beginTransaction().add(R.id.container, new MainPageFragment()).commit();
    }
}

From source file:com.google.android.apps.iosched.ui.DashboardFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View root = inflater.inflate(R.layout.fragment_dashboard, container);

    // Attach event handlers
    root.findViewById(R.id.home_btn_schedule).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Schedule");
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), ScheduleMultiPaneActivity.class));
            } else {
                startActivity(new Intent(getActivity(), ScheduleActivity.class));
            }//  w w w.  j  a v a 2 s  . c o m

        }

    });

    root.findViewById(R.id.home_btn_sessions).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Sessions");
            // Launch sessions list
            if (UIUtils.isHoneycombTablet(getActivity())) {
                startActivity(new Intent(getActivity(), SessionsMultiPaneActivity.class));
            } else {
                final Intent intent = new Intent(Intent.ACTION_VIEW, ScheduleContract.Tracks.CONTENT_URI);
                intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_session_tracks));
                intent.putExtra(TracksFragment.EXTRA_NEXT_TYPE, TracksFragment.NEXT_TYPE_SESSIONS);
                startActivity(intent);
            }

        }
    });

    root.findViewById(R.id.home_btn_starred).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            fireTrackerEvent("Starred");
            // Launch list of sessions and vendors the user has starred
            startActivity(new Intent(getActivity(), StarredActivity.class));
        }
    });

    //        root.findViewById(R.id.home_btn_vendors).setOnClickListener(new View.OnClickListener() {
    //            public void onClick(View view) {
    //                fireTrackerEvent("Sandbox");
    //                // Launch vendors list
    //                if (UIUtils.isHoneycombTablet(getActivity())) {
    //                    startActivity(new Intent(getActivity(), VendorsMultiPaneActivity.class));
    //                } else {
    //                    final Intent intent = new Intent(Intent.ACTION_VIEW,
    //                            ScheduleContract.Tracks.CONTENT_URI);
    //                    intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_vendor_tracks));
    //                    intent.putExtra(TracksFragment.EXTRA_NEXT_TYPE,
    //                            TracksFragment.NEXT_TYPE_VENDORS);
    //                    startActivity(intent);
    //                }
    //            }
    //        });

    root.findViewById(R.id.home_btn_about).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            // Launch map of conference venue
            fireTrackerEvent("Map");
            startActivity(new Intent(getActivity(), UIUtils.getAboutActivityClass(getActivity())));
        }
    });

    root.findViewById(R.id.home_btn_announcements).setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            // splicing in tag streamer
            fireTrackerEvent("Bulletin");
            Intent intent = new Intent(getActivity(), BulletinActivity.class);
            startActivity(intent);
        }
    });

    return root;
}