List of usage examples for android.widget Gallery Gallery
public Gallery(Context context)
From source file:edu.stanford.mobisocial.dungbeetle.ui.fragments.ObjCommentsFragment.java
/** * The parametrization here is absolutely not final. *//*w w w . jav a 2 s . c om*/ public static View getViewForObjComments(Activity activity, Uri feedUri, JSONObject obj) { Cursor c = activity.getContentResolver().query(feedUri, null, DbObjects.getFeedObjectClause(null), null, DbObject._ID + " DESC LIMIT 2"); try { SpinnerAdapter adapter = new ObjectListCursorAdapter(activity, c); Gallery gallery = new Gallery(activity); gallery.setLayoutParams(CommonLayouts.FULL_SCREEN); gallery.setAdapter(adapter); return gallery; } finally { c.close(); } }
From source file:edu.stanford.mobisocial.dungbeetle.ui.fragments.FeedHistoryFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mAdapter = getListAdapter(getActivity(), mFeedUri); Gallery gallery = new Gallery(getActivity()); gallery.setLayoutParams(CommonLayouts.FULL_SCREEN); gallery.setAdapter(mAdapter);/*w w w .ja v a 2 s . c o m*/ gallery.setOnItemClickListener(this); return gallery; }
From source file:mobisocial.musubi.objects.IntroductionObj.java
@Override public View createView(Context context, ViewGroup frame) { LinearLayout wrap = new LinearLayout(context); wrap.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); wrap.setOrientation(LinearLayout.VERTICAL); wrap.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); wrap.setEnabled(false);// w w w . j a v a 2 s . c om wrap.setFocusableInTouchMode(false); wrap.setFocusable(false); wrap.setClickable(false); TextView title = new TextView(context); title.setText(R.string.introduced); title.setTypeface(null, Typeface.BOLD); title.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); wrap.addView(title); Gallery intro = new Gallery(context); intro.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); hackGalleryInit(context, intro); wrap.addView(intro); return wrap; }