android.widget.ExpandableListView.setIndicatorBoundsRelative()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中android.widget.ExpandableListView.setIndicatorBoundsRelative()方法的一些代码示例,展示了ExpandableListView.setIndicatorBoundsRelative()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExpandableListView.setIndicatorBoundsRelative()方法的具体详情如下:
包路径:android.widget.ExpandableListView
类名称:ExpandableListView
方法名:setIndicatorBoundsRelative

ExpandableListView.setIndicatorBoundsRelative介绍

暂无

代码示例

代码示例来源:origin: gigabytedevelopers/FireFiles

@Override
public View onCreateView(
    LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  final View view = inflater.inflate(R.layout.fragment_roots, container, false);
  mList = (ExpandableListView) view.findViewById(android.R.id.list);
  mList.setOnChildClickListener(mItemListener);
  mList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  DisplayMetrics metrics = new DisplayMetrics();
  getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
  int width = Utils.dpToPx(302);
  boolean rtl = Utils.isRTL();
  int leftPadding = rtl ? 10 : 50;
  int rightPadding = rtl ? 50 : 10;
  int leftWidth = width - Utils.dpToPx(leftPadding);
  int rightWidth = width - Utils.dpToPx(rightPadding);
  if(Utils.hasJellyBeanMR2()){
    mList.setIndicatorBoundsRelative(leftWidth, rightWidth);
  } else {
    mList.setIndicatorBounds(leftWidth, rightWidth);
  }
  return view;
}

代码示例来源:origin: stackoverflow.com

expandableList.setIndicatorBounds(expandableList.getRight()- 80, expandableList.getWidth());
} else {
  expandableList.setIndicatorBoundsRelative(expandableList.getRight()- 80, expandableList.getWidth());

代码示例来源:origin: stackoverflow.com

expList.setIndicatorBounds(width - GetDipsFromPixel(50), width - GetDipsFromPixel(10));
} else {
  expList.setIndicatorBoundsRelative(width - GetDipsFromPixel(50), width - GetDipsFromPixel(10));

相关文章

ExpandableListView类方法