Java Code Examples for android.widget.ExpandableListView#setGroupIndicator()

The following examples show how to use android.widget.ExpandableListView#setGroupIndicator() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OfflineMapActivity_Old.java    From TraceByAmap with MIT License 6 votes vote down vote up
/**
 * 初始化所有城市列表
 */
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);
}
 
Example 2
Source File: RecentTabsPage.java    From delion with Apache License 2.0 6 votes vote down vote up
/**
 * 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();
}
 
Example 3
Source File: RecentTabsPage.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * 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();
}
 
Example 4
Source File: FragmentFolders.java    From freemp with Apache License 2.0 6 votes vote down vote up
@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();
        }
    });

}
 
Example 5
Source File: OPDSActivity.java    From document-viewer with GNU General Public License v3.0 6 votes vote down vote up
/**
 * {@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);
}
 
Example 6
Source File: ChannelDetailListAdapter.java    From letv with Apache License 2.0 5 votes vote down vote up
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);
    }
}
 
Example 7
Source File: StarRankAdapter.java    From letv with Apache License 2.0 5 votes vote down vote up
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);
    }
}
 
Example 8
Source File: DetailFragment.java    From Android-Applications-Info with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 9
Source File: ApiTestFragment.java    From AndroidSDK with MIT License 5 votes vote down vote up
@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;
}
 
Example 10
Source File: RecentTabsPage.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 11
Source File: ContactsFragment.java    From MaterialQQLite with Apache License 2.0 4 votes vote down vote up
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);
           }
       });
}
 
Example 12
Source File: GeoARActivity.java    From geoar-app with Apache License 2.0 4 votes vote down vote up
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;
}