本文整理了Java中android.widget.GridView.setEmptyView()
方法的一些代码示例,展示了GridView.setEmptyView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GridView.setEmptyView()
方法的具体详情如下:
包路径:android.widget.GridView
类名称:GridView
方法名:setEmptyView
暂无
代码示例来源:origin: tianshaojie/AndroidFine
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: Uphie/ONE-Unofficial
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: AndroidHensen/YaNi
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: myxh/CoolShopping
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: kaku2015/WeatherAlarmClock
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: shanyao0/SimpleApp
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: huangfangyi/FanXin
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: alienjun/AJWaveRefreshForAndroid
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: gdpancheng/LoonAndroid3
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: open-android/PullToRefresh
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: Wan7451/Wan_RecycleViewAdapter
@Override
public void setEmptyViewInternal(View emptyView) {
super.setEmptyView(emptyView);
}
}
代码示例来源:origin: fire3/sailorcast
@Override
public void onResume() {
super.onResume();
mGrid.setAdapter(mAdapter);
mGrid.setEmptyView(mEmpty);
}
代码示例来源:origin: youtube/yt-direct-lite-android
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View listView = inflater.inflate(R.layout.list_fragment, container, false);
mGridView = (GridView) listView.findViewById(R.id.grid_view);
TextView emptyView = (TextView) listView.findViewById(android.R.id.empty);
mGridView.setEmptyView(emptyView);
return listView;
}
代码示例来源:origin: chengzichen/KrGallery
private void updateSearchInterface() {
if (listAdapter != null) {
listAdapter.notifyDataSetChanged();
}
if (searching && searchResult.isEmpty() || loadingRecent && lastSearchString == null) {
progressView.setVisibility(View.VISIBLE);
listView.setEmptyView(null);
emptyView.setVisibility(View.GONE);
} else {
progressView.setVisibility(View.GONE);
emptyView.setVisibility(View.VISIBLE);
listView.setEmptyView(emptyView);
}
}
代码示例来源:origin: arnabc/simplelauncher
/**
* The default content for a ListFragment has a TextView that can
* be shown when the grid is empty. If you would like to have it
* shown, call this method to supply the text it should use.
*/
public void setEmptyText(CharSequence text) {
ensureGrid();
if (mStandardEmptyView == null) {
throw new IllegalStateException("Can't be used with a custom content view");
}
mStandardEmptyView.setText(text);
if (mEmptyText == null) {
mGrid.setEmptyView(mStandardEmptyView);
}
mEmptyText = text;
}
代码示例来源:origin: xbmc/Kore
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_pvr_list, container, false);
unbinder = ButterKnife.bind(this, root);
hostManager = HostManager.getInstance(getActivity());
swipeRefreshLayout.setOnRefreshListener(this);
emptyView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onRefresh();
}
});
gridView.setEmptyView(emptyView);
return root;
}
代码示例来源:origin: xiangzhihong/newsApp
private void setAdapter() {
//实例化适配器
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_dropdown_item, GAME_NAME);
gridViewAdapter = new GridViewAdapter(getContext(), gameListItems);
//设置适配器
sp.setAdapter(adapter);
game_grid.setAdapter(gridViewAdapter);
//当没有数据时,展示tv_empty的内容
game_grid.setEmptyView(tv_empty);
}
代码示例来源:origin: xbmc/Kore
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_pvr_list, container, false);
unbinder = ButterKnife.bind(this, root);
if (savedInstanceState != null) {
selectedChannelGroupId = savedInstanceState.getInt(CHANNELGROUPID);
singleChannelGroup = savedInstanceState.getBoolean(SINGLECHANNELGROUP);
}
hostManager = HostManager.getInstance(getActivity());
currentListType = getArguments().getInt(PVRListFragment.PVR_LIST_TYPE_KEY, PVRListFragment.LIST_TV_CHANNELS);
swipeRefreshLayout.setOnRefreshListener(this);
emptyView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onRefresh();
}
});
gridView.setEmptyView(emptyView);
return root;
}
代码示例来源:origin: iHaPBoy/BookShelf
tvText.setText("暂无图书");
gridView.setEmptyView(emptyView);
代码示例来源:origin: xbmc/Kore
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_cast);
ButterKnife.bind(this);
// Set up the drawer.
navigationDrawerFragment = (NavigationDrawerFragment)getSupportFragmentManager()
.findFragmentById(R.id.navigation_drawer);
navigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout));
if (savedInstanceState == null) {
movie_tvshow_title = getIntent().getStringExtra(EXTRA_TITLE);
castArrayList = getIntent().getParcelableArrayListExtra(EXTRA_CAST_LIST);
} else {
movie_tvshow_title = savedInstanceState.getString(EXTRA_TITLE);
castArrayList = savedInstanceState.getParcelableArrayList(EXTRA_CAST_LIST);
}
//LogUtils.LOGD(TAG, "Showing cast for: " + movie_tvshow_title);
// Configure the grid
castGridView.setEmptyView(emptyView);
castGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Get the name from the tag
Utils.openImdbForPerson(AllCastActivity.this, ((ViewHolder)view.getTag()).castName);
}
});
CastArrayAdapter arrayAdapter = new CastArrayAdapter(this, castArrayList);
castGridView.setAdapter(arrayAdapter);
setupActionBar(movie_tvshow_title);
}
内容来源于网络,如有侵权,请联系作者删除!