<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Muhammadsolih Abdug’afforov on Medium]]></title>
        <description><![CDATA[Stories by Muhammadsolih Abdug’afforov on Medium]]></description>
        <link>https://medium.com/@salikhdev?source=rss-2120d5492697------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y5Rrkl_r6aiDtYqkdyWt6g.png</url>
            <title>Stories by Muhammadsolih Abdug’afforov on Medium</title>
            <link>https://medium.com/@salikhdev?source=rss-2120d5492697------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 03:13:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salikhdev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RecyclerView uchun adapter yaratish.]]></title>
            <link>https://medium.com/@salikhdev/recyclerview-uchun-adapter-yaratish-3f2e0fc6a1ed?source=rss-2120d5492697------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f2e0fc6a1ed</guid>
            <category><![CDATA[adapter]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[recyclerview]]></category>
            <dc:creator><![CDATA[Muhammadsolih Abdug’afforov]]></dc:creator>
            <pubDate>Tue, 06 Jun 2023 19:05:38 GMT</pubDate>
            <atom:updated>2023-06-06T19:05:38.157Z</atom:updated>
            <content:encoded><![CDATA[<p>Assalomu alaykum! Bu post orqali Androidda RecyclerView uchun Adapter yasashni va u nega kerakligini bilib olasiz.</p><p><strong>RecyclerView nima ?</strong></p><p>RecyclerView Android platformasidagi bir widget bo’lib uning asosiy maqsadi list ko’rinishidagi ma’lumotlarni ekranga ko’rsatishdir. RecyclerView, avtomatik scroll va qo’shimcha imkoniyatlarni o’z ichiga olgan ListView ning yangi va kuchliroq versiyasi hisoblanadi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*8ypREAG1AP4kftS3t_5tPA.png" /></figure><p><strong>Adapter nima ?</strong></p><p><strong>Adapter</strong> ma’lumotlarni RecyclerView (yoki boshqa ro’yxat) elementlariga bog’lash uchun kerak bo’ladi. RecyclerView tayyorlangandan so’ng, unga adapter bog’lanadi va RecyclerView adapter orqali elementlar bilan to’ldiriladi.</p><p><strong><em>Hayotiy misol :<br> — </em></strong>G’isht chiqaruvchi zavod bor unga loy kirgizib yuborsangiz va hohlagan shaklingizni tanlasangiz g’ishtni yasab beradi.<br> — <strong>Adapterga </strong>ham malumot va ko’rinishni bersangiz u sizga tayyor bir elementni (ko’rinishni) yasab beradi.</p><p>Rasimda ko’rishingiz mumkin :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*qt2LGJTVh3dfc-8OspSMDw.png" /></figure><p><strong>Ketma ket barcha ishlarni bajaramiz !</strong></p><p>Birinchi navbatda ko’rinishni yasab o’lishimiz kerak. misol uchun :</p><p><strong><em>item_layout.xml</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0c2da747b2ed219db3cfa278c3cf12e/href">https://medium.com/media/f0c2da747b2ed219db3cfa278c3cf12e/href</a></iframe><p>So’ngra <strong>Adapter </strong>classni yaratib unga quydagi narsalarni yozamiz.<br><strong>Adapter</strong>, quyidagi asosiy funksiyalarni o’z ichiga oladi:</p><ol><li>onCreateViewHolder(): RecyclerView elementlarining XML ma&#39;lumotlari bilan bog&#39;liq View-holderni yaratadi.</li><li>onBindViewHolder(): Ma&#39;lumotlarni elementlar bilan bog&#39;laydi. Bu metod, ma&#39;lumotlar RecyclerView elementiga biriktirildikda ishlatiladi.</li><li>getItemCount(): Adapterda mavjud bo&#39;lgan ma&#39;lumotlar sonini qaytaradi.</li></ol><p><strong>Adapter </strong>yaratish uchun siz o’zingizning adapter klassingizni RecyclerView.Adapter klassidan nasl olasiz va unga kerakli metodlarni implement qilasiz.</p><p><strong><em>MyAdapter.kt</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb9c0542d2cb47985657ff3f9684d709/href">https://medium.com/media/eb9c0542d2cb47985657ff3f9684d709/href</a></iframe><p>Ko’rinish va Adapterni yaratib bo’lganimizdan so’ng adapterni RecyclerViewga ulashimiz kerak.</p><p><strong><em>activity_main.xml</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb96d6905db73eb3a1c8416d5720166f/href">https://medium.com/media/bb96d6905db73eb3a1c8416d5720166f/href</a></iframe><p><strong><em>MainActivity.kt</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f7f1dbd9117844466d89a29f5c9c1d4/href">https://medium.com/media/2f7f1dbd9117844466d89a29f5c9c1d4/href</a></iframe><blockquote>Adapter orqali RecyclerViewga malumotlarni bog’lashni ko’rib chiqdik.<br>Ushbu loyhaning havolasi : <a href="https://github.com/salikhdev/Adapter"><strong>Adapter Project with salikhdev</strong></a></blockquote><p>GitHub : <a href="https://github.com/salikhdev"><strong><em>buyerda</em></strong></a><strong><em><br></em></strong>Instagram <strong><em>: </em></strong><a href="https://www.instagram.com/salikhdev/"><strong><em>buyerda</em></strong></a></p><p>O’qiganingiz uchun raxmat! O’qiganingiz sizga yoqqan bo’lsa, qarsak chalishni unutmang 😊. Ko’dlashda odam tilayman!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f2e0fc6a1ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>