예제 #1
0
 @Override
 public ConversationViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
   ConversationView v = new ConversationView(viewGroup.getContext());
   v.setLayoutParams(
       new LinearLayout.LayoutParams(
           LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
   ConversationViewHolder view = new ConversationViewHolder(v);
   BaseActivity.applyFont(v);
   return view;
 }
예제 #2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout containing a title and body text.
    ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_tutorial, container, false);

    String str = getResources().getStringArray(R.array.tutor)[mPageNumber];
    ((TextView) rootView.findViewById(R.id.tutorTextView)).setText(str);

    ImageView img = (ImageView) rootView.findViewById(R.id.img_tutor);
    int[] res = new int[] {R.drawable.ic_tutor_1, R.drawable.ic_tutor_2, R.drawable.ic_tutor_3};
    img.setImageResource(res[mPageNumber % res.length]);

    BaseActivity.applyFont(rootView);
    return rootView;
  }