Exemplo n.º 1
0
 private void arrowlistener() {
   int width = arrowicon.getMeasuredWidth();
   int height = arrowicon.getMeasuredHeight();
   LogUtils.D("onClick" + width + " " + height);
   Matrix matrix = new Matrix();
   count++;
   matrix.postRotate(180 * count, width / 2, height / 2);
   arrowicon.setImageMatrix(matrix);
   if (count % 2 != 0) {
     list_title.setVisibility(View.VISIBLE);
     list_content.setVisibility(View.VISIBLE);
     View view = (View) mViewPager.getParent();
     Bitmap bitmap =
         BitmapUtils.shot(
             getView(),
             (int) view.getX(),
             (int) view.getY(),
             mViewPager.getMeasuredWidth(),
             mViewPager.getMeasuredHeight());
     if (bitmap != null)
       list_content.setBackground(
           new BitmapDrawable(BitmapUtils.blurBitmap(bitmap, getActivity())));
     //                    list_content.setBackground(new
     // BitmapDrawable(BitmapUtils.compressBmpFromBmp(bitmap)));
     mItemHScrollView.setVisibility(View.GONE);
     mViewPager.setVisibility(View.GONE);
   } else {
     list_title.setVisibility(View.GONE);
     list_content.setVisibility(View.GONE);
     list_content.setBackground(null);
     mItemHScrollView.setVisibility(View.VISIBLE);
     mViewPager.setVisibility(View.VISIBLE);
   }
 }
Exemplo n.º 2
0
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      LogUtils.D("getView " + position);

      TextView textView = new TextView(parent.getContext());
      textView.setText(array[position]);
      textView.setTag(array[position]);
      textView.setPadding(100, 40, 40, 40);
      //            ColorStateList csl = (ColorStateList)
      // getResources().getColorStateList(R.color.tab_text_selector);
      //            if (csl != null) {
      //                textView.setTextColor(csl);//设置按钮文字颜色
      //            }
      textView.setTag("position " + position);
      return textView;
    }
Exemplo n.º 3
0
 public LanmuAdapter(String[] array) {
   this.array = array;
   LogUtils.D("LanmuAdapter " + array.length);
 }