android.widget.ExpandableListView#setGroupIndicator ( )源码实例Demo

下面列出了android.widget.ExpandableListView#setGroupIndicator ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: TraceByAmap   文件: OfflineMapActivity_Old.java
/**
 * 初始化所有城市列表
 */
public void initAllCityList() {
	// 扩展列表
	View provinceContainer = LayoutInflater.from(OfflineMapActivity_Old.this)
			.inflate(R.layout.offline_province_listview, null);
	mAllOfflineMapList = (ExpandableListView) provinceContainer
			.findViewById(R.id.province_download_list);
	initProvinceListAndCityMap();
	// adapter = new OfflineListAdapter(provinceList, cityMap, amapManager,
	// OfflineMapActivity_Old.this);
	adapter = new OfflineListAdapter(provinceList, amapManager,
			OfflineMapActivity_Old.this);
	// 为列表绑定数据源
	mAllOfflineMapList.setAdapter(adapter);
	// adapter实现了扩展列表的展开与合并监听
	mAllOfflineMapList.setOnGroupCollapseListener(adapter);
	mAllOfflineMapList.setOnGroupExpandListener(adapter);
	mAllOfflineMapList.setGroupIndicator(null);
}
 
源代码2 项目: delion   文件: RecentTabsPage.java
/**
 * Constructor returns an instance of RecentTabsPage.
 *
 * @param activity The activity this view belongs to.
 * @param recentTabsManager The RecentTabsManager which provides the model data.
 */
public RecentTabsPage(Activity activity, RecentTabsManager recentTabsManager) {
    mActivity = activity;
    mRecentTabsManager = recentTabsManager;

    mTitle = activity.getResources().getString(R.string.recent_tabs);
    mThemeColor = ApiCompatibilityUtils.getColor(
            activity.getResources(), R.color.default_primary_color);
    mRecentTabsManager.setUpdatedCallback(this);
    LayoutInflater inflater = LayoutInflater.from(activity);
    mView = (ViewGroup) inflater.inflate(R.layout.recent_tabs_page, null);
    mListView = (ExpandableListView) mView.findViewById(R.id.odp_listview);
    mAdapter = buildAdapter(activity, recentTabsManager);
    mListView.setAdapter(mAdapter);
    mListView.setOnChildClickListener(this);
    mListView.setGroupIndicator(null);
    mListView.setOnGroupCollapseListener(this);
    mListView.setOnGroupExpandListener(this);
    mListView.setOnCreateContextMenuListener(this);

    mView.addOnAttachStateChangeListener(this);
    ApplicationStatus.registerStateListenerForActivity(this, activity);
    // {@link #mInForeground} will be updated once the view is attached to the window.

    onUpdated();
}
 
源代码3 项目: AndroidChromium   文件: RecentTabsPage.java
/**
 * Constructor returns an instance of RecentTabsPage.
 *
 * @param activity The activity this view belongs to.
 * @param recentTabsManager The RecentTabsManager which provides the model data.
 */
public RecentTabsPage(Activity activity, RecentTabsManager recentTabsManager) {
    mActivity = activity;
    mRecentTabsManager = recentTabsManager;

    mTitle = activity.getResources().getString(R.string.recent_tabs);
    mThemeColor = ApiCompatibilityUtils.getColor(
            activity.getResources(), R.color.default_primary_color);
    mRecentTabsManager.setUpdatedCallback(this);
    LayoutInflater inflater = LayoutInflater.from(activity);
    mView = (ViewGroup) inflater.inflate(R.layout.recent_tabs_page, null);
    mListView = (ExpandableListView) mView.findViewById(R.id.odp_listview);
    mAdapter = buildAdapter(activity, recentTabsManager);
    mListView.setAdapter(mAdapter);
    mListView.setOnChildClickListener(this);
    mListView.setGroupIndicator(null);
    mListView.setOnGroupCollapseListener(this);
    mListView.setOnGroupExpandListener(this);
    mListView.setOnCreateContextMenuListener(this);

    mView.addOnAttachStateChangeListener(this);
    ApplicationStatus.registerStateListenerForActivity(this, activity);
    // {@link #mInForeground} will be updated once the view is attached to the window.

    onUpdated();
}
 
源代码4 项目: freemp   文件: FragmentFolders.java
@Override
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    Bundle args = getArguments();

    if (args != null) {
        String title = "" + args.getCharSequence(Constants.KEY_TITLE);
    }
    listView = (ExpandableListView) view.findViewById(R.id.expandableListView);
    listView.setGroupIndicator(null);
    final TextView textView = (TextView) view.findViewById(R.id.textViewSave);
    textView.setClickable(true);
    textView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            ((ActPlaylist) activity).save();
        }
    });

}
 
源代码5 项目: document-viewer   文件: OPDSActivity.java
/**
 * {@inheritDoc}
 *
 * @see org.emdev.ui.AbstractActionActivity#onCreateImpl(android.os.Bundle)
 */
@Override
protected void onCreateImpl(final Bundle savedInstanceState) {

    setContentView(R.layout.opds);
    setActionForView(R.id.opdsaddfeed);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    
    final OPDSActivityController c = getController();

    list = (ExpandableListView) findViewById(R.id.opdslist);
    list.setGroupIndicator(null);
    list.setChildIndicator(null);
    list.setOnGroupClickListener(c);
    list.setOnChildClickListener(c);
    list.setAdapter(c.adapter);

    this.registerForContextMenu(list);
}
 
源代码6 项目: letv   文件: ChannelDetailListAdapter.java
public void setList(ExpandableListView listView, ArrayList<AlbumInfo> list) {
    if (list != null && listView != null) {
        this.mList.clear();
        this.mList.addAll(list);
        notifyDataSetChanged();
        for (int i = 0; i < getGroupCount(); i++) {
            listView.expandGroup(i);
        }
        listView.setGroupIndicator(null);
    }
}
 
源代码7 项目: letv   文件: StarRankAdapter.java
public void setList(ExpandableListView listView, List<LTStarRankModelDetailPB> list) {
    if (list != null && listView != null) {
        this.mList.clear();
        this.mList.addAll(list);
        notifyDataSetChanged();
        for (int i = 0; i < getGroupCount(); i++) {
            listView.expandGroup(i);
        }
        listView.setGroupIndicator(null);
    }
}
 
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mLayoutInflater = inflater;

    ExpandableListView listView = new ExpandableListView(getActivity());
    listView.setGroupIndicator(null);

    if (mPackageInfo == null) {
        Toast.makeText(getActivity(), R.string.app_not_installed, Toast.LENGTH_LONG).show();
    } else {
        listView.setAdapter(new Adapter());
    }

    return listView;
}
 
源代码9 项目: AndroidSDK   文件: ApiTestFragment.java
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    mInflater = inflater;
    View v = inflater.inflate(R.layout.fragment_api_test, container, false);
    mProgressDialog = new ProgressDialog(getActivity());
    mProgressDialog.setMessage("Sending request...");

    mExpandableListView = (ExpandableListView) v.findViewById(R.id.expandable_list_view);
    mExpandableListView.setGroupIndicator(null);
    initData();
    mExpandableListView.setOnChildClickListener(this);
    return v;
}
 
源代码10 项目: 365browser   文件: RecentTabsPage.java
/**
 * Constructor returns an instance of RecentTabsPage.
 *
 * @param activity The activity this view belongs to.
 * @param recentTabsManager The RecentTabsManager which provides the model data.
 */
public RecentTabsPage(ChromeActivity activity, RecentTabsManager recentTabsManager) {
    mActivity = activity;
    mRecentTabsManager = recentTabsManager;

    mTitle = activity.getResources().getString(R.string.recent_tabs);
    mThemeColor = ApiCompatibilityUtils.getColor(
            activity.getResources(), R.color.default_primary_color);
    mRecentTabsManager.setUpdatedCallback(this);
    LayoutInflater inflater = LayoutInflater.from(activity);
    mView = (ViewGroup) inflater.inflate(R.layout.recent_tabs_page, null);
    mListView = (ExpandableListView) mView.findViewById(R.id.odp_listview);
    mAdapter = new RecentTabsRowAdapter(activity, recentTabsManager);
    mListView.setAdapter(mAdapter);
    mListView.setOnChildClickListener(this);
    mListView.setGroupIndicator(null);
    mListView.setOnGroupCollapseListener(this);
    mListView.setOnGroupExpandListener(this);
    mListView.setOnCreateContextMenuListener(this);

    mView.addOnAttachStateChangeListener(this);
    ApplicationStatus.registerStateListenerForActivity(this, activity);
    // {@link #mInForeground} will be updated once the view is attached to the window.

    if (activity.getBottomSheet() != null) {
        View recentTabsRoot = mView.findViewById(R.id.recent_tabs_root);
        ApiCompatibilityUtils.setPaddingRelative(recentTabsRoot,
                ApiCompatibilityUtils.getPaddingStart(recentTabsRoot), 0,
                ApiCompatibilityUtils.getPaddingEnd(recentTabsRoot),
                activity.getResources().getDimensionPixelSize(
                        R.dimen.bottom_control_container_height));
    }

    onUpdated();
}
 
源代码11 项目: MaterialQQLite   文件: ContactsFragment.java
private void initView() {
       m_QQClient = AppData.getAppData().getQQClient();
       m_buddyList = m_QQClient.getBuddyList();

//	m_btnBuddyTeam = (Button)getActivity().findViewById(R.id.contacts_btnBuddyTeam);
//	m_btnAllBuddy = (Button)getActivity().findViewById(R.id.contacts_btnAllBuddy);
	mListView = (ExpandableListView)getActivity().findViewById(R.id.expandableListView);
//	m_btnGroup = (ImageButton)getActivity().findViewById(R.id.contacts_btnGroup);
       swipeRefreshLayout_freind= (PullRefreshLayout) getActivity().findViewById(R.id.swipeRefreshLayout_friend);
//	m_btnBuddyTeam.setOnClickListener(this);
//	m_btnAllBuddy.setOnClickListener(this);
//	m_btnGroup.setOnClickListener(this);

       //ExpandableListView actualListView = mListView.getRefreshableView();
       mListView.setGroupIndicator(null);
       m_blistAdapter = new BuddyListAdapter(getActivity(), m_buddyList);
       mListView.setAdapter(m_blistAdapter);
       mListView.setDescendantFocusability(
       		ExpandableListView.FOCUS_AFTER_DESCENDANTS);
       mListView.setOnChildClickListener(this);
       
   //    mListView.getLoadingLayoutProxy().setPullLabel("下拉刷新");
   //    mListView.getLoadingLayoutProxy().setReleaseLabel("释放立即刷新");
   //    mListView.getLoadingLayoutProxy().setRefreshingLabel("正在刷新...");
   //    mListView.getLoadingLayoutProxy().setLastUpdatedLabel("");

       swipeRefreshLayout_freind.setOnRefreshListener(new PullRefreshLayout.OnRefreshListener() {
           @Override
           public void onRefresh() {
               new GetDataTask().execute();
               swipeRefreshLayout_freind.postDelayed(new Runnable() {
                   @Override
                   public void run() {
                       swipeRefreshLayout_freind.setRefreshing(false);
                       refresh();
                       // m_glistAdapter.notifyDataSetChanged();
                   }
               }, 1000);
           }
       });
}
 
源代码12 项目: geoar-app   文件: GeoARActivity.java
private PopupWindow getPopup() {
	if (mPopup == null) {
		ViewGroup layout = (ViewGroup) mInflater.inflate(
				R.layout.datasource_list_window, null);

		mListView = (ExpandableListView) layout
				.findViewById(R.id.expandableListView);

		Button moreButton = (Button) layout
				.findViewById(R.id.buttonMore);

		DataSourceListAdapter sourceListAdapter = new DataSourceListAdapter(
				GeoARActivity.this, mListView, visualizationClass);
		mListView.setAdapter(sourceListAdapter);
		IntroController.addViewToStep(9, mListView.getChildAt(mListView.getFirstVisiblePosition()));
		mListView.setGroupIndicator(null);

		// Click event for "More" button
		moreButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				showFragment(mPluginFragment);
				mPopup.dismiss();
			}
		});

		mPopup = new ActionProviderPopupWindow(layout);
		mPopup.setTouchable(true);
		mPopup.setOutsideTouchable(true);

		TypedArray typedArray = obtainStyledAttributes(new int[] { R.attr.actionDropDownStyle });
		int resId = typedArray.getResourceId(0, 0);
		typedArray = obtainStyledAttributes(resId,
				new int[] { android.R.attr.popupBackground });
		mPopup.setBackgroundDrawable(new BitmapDrawable(getResources()));
		layout.setBackgroundResource(typedArray.getResourceId(0, 0));
		// mPopup.setBackgroundDrawable(typedArray.getDrawable(0));
		mPopup.setWindowLayoutMode(0, LayoutParams.WRAP_CONTENT);

		// Set width of menu
		mPopup.setWidth((int) TypedValue.applyDimension(
				TypedValue.COMPLEX_UNIT_DIP, 250, getResources()
						.getDisplayMetrics()));

	}
	return mPopup;
}