Carousel中的意图活动

时间:2018-06-14 08:21:32

标签: android

  

我想在我的CarouselPicker fir中添加不同的意图活动,每个不同的值选择如何添加

   public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState)
        {


        View v = inflater.inflate(R.layout.fragment_action,container,false);
        TextView textView = (TextView)v.findViewById( R.id.textView7 );
        textView.setPaintFlags( textView.getPaintFlags()|Paint.UNDERLINE_TEXT_FLAG );
        CarouselPicker carouselPicker1 = (CarouselPicker)v.findViewById( R.id.carouselPicker1 );
        List<CarouselPicker.PickerItem> itemsImages = new ArrayList<>();
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.website_design));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.digital_marketing));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.domain_registration));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.graphic));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.mob));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.server));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.software_development));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.ontent));
        itemsImages.add(new CarouselPicker.DrawableItem(R.drawable.ssl));
//        CarouselPicker.CarouselViewAdapter imageAdapter = new CarouselPicker.CarouselViewAdapter(this,itemsImages,0);
        CarouselPicker.CarouselViewAdapter imageAdapter = new CarouselPicker.CarouselViewAdapter(this.getContext(),itemsImages,0);
        carouselPicker1.setAdapter(imageAdapter);

0 个答案:

没有答案