use of android.widget.GridView in project Klyph by jonathangerbaud.
the class GridDialogFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(getCustomLayout(), container, false);
gridView = (GridView) view.findViewById(R.id.grid);
View emptyView = getEmptyView();
if (emptyView != null) {
emptyView.setId(android.R.id.empty);
((ViewGroup) gridView.getParent()).addView(emptyView);
gridView.setEmptyView(emptyView);
}
return view;
}
use of android.widget.GridView in project Talon-for-Twitter by klinker24.
the class ProfilePicturesFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
screenName = getArguments().getString("screen_name");
settings = AppSettings.getInstance(context);
sharedPrefs = context.getSharedPreferences("com.klinker.android.twitter_world_preferences", 0);
inflater = LayoutInflater.from(context);
layout = inflater.inflate(R.layout.pictures_fragment, null);
listView = (GridView) layout.findViewById(R.id.listView);
spinner = (LinearLayout) layout.findViewById(R.id.spinner);
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView absListView, int i) {
}
@Override
public void onScroll(AbsListView absListView, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
final int lastItem = firstVisibleItem + visibleItemCount;
if (lastItem == totalItemCount && canRefresh) {
getMore();
}
}
});
final LinearLayout getTweets = (LinearLayout) layout.findViewById(R.id.load_tweets);
final Button getPics = (Button) layout.findViewById(R.id.get_pics);
getPics.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getTweets.setVisibility(View.GONE);
spinner.setVisibility(View.VISIBLE);
doSearch();
}
});
return layout;
}
use of android.widget.GridView in project coursera-android by aporter.
the class GridFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.grid_fragment, container, false);
mGridview = (GridView) view.findViewById(R.id.gridview);
return view;
}
use of android.widget.GridView in project ActionBar-PullToRefresh by chrisbanes.
the class GridViewActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.ptr_gridview);
ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ITEMS);
gridView.setAdapter(adapter);
// Now find the PullToRefreshLayout and set it up
mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
ActionBarPullToRefresh.from(this).options(Options.create().scrollDistance(.75f).headerLayout(R.layout.customised_header).headerTransformer(new CustomisedHeaderTransformer()).build()).allChildrenArePullable().listener(this).useViewDelegate(GridView.class, new AbsListViewDelegate()).setup(mPullToRefreshLayout);
}
use of android.widget.GridView in project ActionBar-PullToRefresh by chrisbanes.
the class GridViewActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.ptr_gridview);
ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ITEMS);
gridView.setAdapter(adapter);
// Now find the PullToRefreshLayout and set it up
mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
ActionBarPullToRefresh.from(this).options(Options.create().scrollDistance(.75f).headerLayout(R.layout.customised_header).headerTransformer(new CustomisedHeaderTransformer()).build()).allChildrenArePullable().listener(this).useViewDelegate(GridView.class, new AbsListViewDelegate()).setup(mPullToRefreshLayout);
}
Aggregations