Exemplo n.º 1
0
    @Override
    public View onCreateView(ViewGroup parent) {
      MaterialRippleLayout layout = new MaterialRippleLayout(getContext());
      TextView tv = new TextView(parent.getContext());
      tv.setLayoutParams(
          new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, JUtils.dip2px(48)));
      tv.setGravity(Gravity.CENTER);
      tv.setText(title);
      layout.addView(tv);
      layout.setRippleColor(getContext().getResources().getColor(R.color.gray));
      layout.setLayoutParams(
          new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, JUtils.dip2px(48)));

      return layout;
    }