Android RecyclerView & CardView - Part 03 - Handle Item clicks

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ต.ค. 2024

ความคิดเห็น • 38

  • @kioton
    @kioton 6 ปีที่แล้ว +1

    Thank you so much for this video.
    i did some modification, I dont need the image so i used Textview. In my model.xml
    I have 4 Textview
    Title
    Date
    Sample Description
    Body
    I did the same in my activity_details. Everything works perfectly fine.
    The challenge i have right now is, I dont need the Body to show in the main Luncher activity.
    Help me please.
    Once again nice video

    • @AtifSayings
      @AtifSayings  6 ปีที่แล้ว +1

      Model p = new Model();
      p.setTitle("Title here");
      p.setDate("Date here");
      p.setDescription("Description here");
      p.seBody("Body here"); //if you don't want to display 'Body', just delete it
      models.add(p);

    • @kioton
      @kioton 6 ปีที่แล้ว

      Thanks

  • @cinubambarkar8404
    @cinubambarkar8404 5 ปีที่แล้ว +1

    how do i set intent for each card view to open new activity...i used intent in onItemclick class in if condition but it doesn't work...

    • @AtifSayings
      @AtifSayings  5 ปีที่แล้ว

      show your code

    • @saurabhsanmane7914
      @saurabhsanmane7914 5 ปีที่แล้ว

      @@AtifSayings I mailed you my project with problem description please resolve it

    • @AtifSayings
      @AtifSayings  5 ปีที่แล้ว

      @@saurabhsanmane7914 I've received your mail and will check soon..

    • @AtifSayings
      @AtifSayings  5 ปีที่แล้ว

      @@saurabhsanmane7914 I've received your mail and will check soon..

  • @saurabhsanmane7914
    @saurabhsanmane7914 5 ปีที่แล้ว +1

    Their was a problem in 2nd type intent not working in onclick event please resolve this problem

    • @AtifSayings
      @AtifSayings  5 ปีที่แล้ว

      I've received your mail and will check soon..

  • @rahulsingh-mh5hz
    @rahulsingh-mh5hz 5 ปีที่แล้ว

    Sir how to pass the icon on other activity (list view icon).what's the merhod

  • @arirespati1379
    @arirespati1379 6 ปีที่แล้ว +1

    thanks for this tutorial. as an experiment, I do part 1 to part 3 to handle on click after I run the application, why does the number 1 appear and the last number appears? Thank you

    • @AtifSayings
      @AtifSayings  6 ปีที่แล้ว

      skipped second part?

    • @arirespati1379
      @arirespati1379 6 ปีที่แล้ว

      no. I have followed part 1 to 3.

    • @AtifSayings
      @AtifSayings  6 ปีที่แล้ว

      only first and last item is displaying?

    • @arirespati1379
      @arirespati1379 6 ปีที่แล้ว

      yes. Why? I use Android Studio 3.0.1.

    • @arirespati1379
      @arirespati1379 6 ปีที่แล้ว

      if the second to fourth is clicked, the application exits

  • @vibhanshu_vaibhav
    @vibhanshu_vaibhav 4 ปีที่แล้ว

    Hello sir after cliking item, DetailActivity is not opening. Help me

    • @AtifSayings
      @AtifSayings  4 ปีที่แล้ว

      have you added startactivity intent?

    • @vibhanshu_vaibhav
      @vibhanshu_vaibhav 4 ปีที่แล้ว

      @@AtifSayings yes sir ... jaisa apne coding kiya waisa hi follow kiya hu bt app is crashing when click on item

    • @AtifSayings
      @AtifSayings  4 ปีที่แล้ว

      @@vibhanshu_vaibhav ho sakta h app crash ho ri ho logcat check kro

    • @vibhanshu_vaibhav
      @vibhanshu_vaibhav 4 ปีที่แล้ว

      @@AtifSayings sir .. can you come on anydesk ?

  • @tanvirhasan4108
    @tanvirhasan4108 6 ปีที่แล้ว +1

    thanks for this video.

  • @tajenderbhardwaj268
    @tajenderbhardwaj268 6 ปีที่แล้ว +1

    please make a video recycylerview with gridlayoutManager used
    data are show in gridlayout formte using recyclerview

    • @AtifSayings
      @AtifSayings  6 ปีที่แล้ว

      USE THIS FOR GRIDLAYOUT/GRIDVIEW:
      mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2)); //GridLayout, here 2 means 2 columns in each row
      USE THIS FOR LINEARLAYOUT(VERTICAL):
      mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); //LinearLayout

  • @pablorocha7578
    @pablorocha7578 4 ปีที่แล้ว

    if --> E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! ----> The transaction data is limited in intent. If you need a bitmap or a big file, you must not pass it as an extra instead just pass image path or uri and make the bitmap or file in your activity where you are displaying or using it.

  • @parthkothari4906
    @parthkothari4906 5 ปีที่แล้ว +1

    Thanks a lot for me

  • @hafizurrony
    @hafizurrony 5 ปีที่แล้ว

    projects asa but ads implements korta pari na...

  • @vibhanshu_vaibhav
    @vibhanshu_vaibhav 4 ปีที่แล้ว

    Sir help me i am getting problem

  • @arirespati1379
    @arirespati1379 6 ปีที่แล้ว

    I've sent an email