本文整理汇总了Java中android.widget.ExpandableListView.setEmptyView方法的典型用法代码示例。如果您正苦于以下问题:Java ExpandableListView.setEmptyView方法的具体用法?Java ExpandableListView.setEmptyView怎么用?Java ExpandableListView.setEmptyView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.ExpandableListView
的用法示例。
在下文中一共展示了ExpandableListView.setEmptyView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initViews
import android.widget.ExpandableListView; //导入方法依赖的package包/类
private void initViews() {
mNavigationIndex = getIntent()
.getIntExtra(EXTRA_PRE_LOAD_DATA_INDEX, 0);
llytOperate = (LinearLayout) findViewById(R.id.operate);
btnCancel = (Button) findViewById(R.id.cancel);
btnCancel.setOnClickListener(this);
btnPay = (Button) findViewById(R.id.pay);
btnPay.setOnClickListener(this);
tvEmptyView = (TextView) findViewById(R.id.emptyView);
lvOrders = (ExpandableListView) findViewById(R.id.orders);
lvOrders.setEmptyView(tvEmptyView);
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View footerView = inflater.inflate(R.layout.fv_a6_order, null);
lvOrders.addFooterView(footerView);
mAdapter = new A6OrderExpandableAdapter(this, mLstODBInfos);
lvOrders.setAdapter(mAdapter);
// btnPay.setEnabled(false);
setPanelGone(true);
}
示例2: onContentChanged
import android.widget.ExpandableListView; //导入方法依赖的package包/类
/**
* Updates the screen state (current list and other views) when the content changes.
*
* @see android.support.v7.app.AppCompatActivity#onContentChanged()
*/
@Override
public void onContentChanged() {
super.onContentChanged();
View emptyView = findViewById(R.id.empty);
mList = (ExpandableListView) findViewById(R.id.list);
if (mList == null) {
throw new RuntimeException(
"Your content must have a ExpandableListView whose id attribute is " +
"'R.id.list'");
}
if (emptyView != null) {
mList.setEmptyView(emptyView);
}
mList.setOnChildClickListener(this);
mList.setOnGroupExpandListener(this);
mList.setOnGroupCollapseListener(this);
if (mFinishedStart) {
setListAdapter(mAdapter);
}
mFinishedStart = true;
}