পেজিং
এই টেবিলে androidx.paging গ্রুপের সমস্ত আর্টিফ্যাক্টের তালিকা দেওয়া আছে।
| শিল্পকর্ম | স্থিতিশীল রিলিজ | রিলিজ প্রার্থী | বিটা রিলিজ | আলফা রিলিজ |
|---|---|---|---|---|
| পেজিং-* | ৩.৩.৬ | - | ৩.৪.০-বিটা০১ | - |
| পৃষ্ঠা-রচনা | ৩.৩.৬ | - | ৩.৪.০-বিটা০১ | - |
নির্ভরতা ঘোষণা করা
পেজিং-এর উপর নির্ভরতা যোগ করতে, আপনার প্রোজেক্টে Google Maven রিপোজিটরি যোগ করতে হবে। আরও তথ্যের জন্য Google-এর Maven রিপোজিটরি পড়ুন।
আপনার অ্যাপ বা মডিউলের জন্য build.gradle ফাইলে আপনার প্রয়োজনীয় আর্টিফ্যাক্টের জন্য নির্ভরতা যোগ করুন:
গ্রোভি
dependencies { def paging_version = "3.3.6" implementation "androidx.paging:paging-runtime:$paging_version" // alternatively - without Android dependencies for tests testImplementation "androidx.paging:paging-common:$paging_version" // optional - RxJava2 support implementation "androidx.paging:paging-rxjava2:$paging_version" // optional - RxJava3 support implementation "androidx.paging:paging-rxjava3:$paging_version" // optional - Guava ListenableFuture support implementation "androidx.paging:paging-guava:$paging_version" // optional - Jetpack Compose integration implementation "androidx.paging:paging-compose:3.4.0-beta01" }
কোটলিন
dependencies { val paging_version = "3.3.6" implementation("androidx.paging:paging-runtime:$paging_version") // alternatively - without Android dependencies for tests testImplementation("androidx.paging:paging-common:$paging_version") // optional - RxJava2 support implementation("androidx.paging:paging-rxjava2:$paging_version") // optional - RxJava3 support implementation("androidx.paging:paging-rxjava3:$paging_version") // optional - Guava ListenableFuture support implementation("androidx.paging:paging-guava:$paging_version") // optional - Jetpack Compose integration implementation("androidx.paging:paging-compose:3.4.0-beta01") }
কোটলিন এক্সটেনশন ব্যবহার সম্পর্কে তথ্যের জন্য, ktx ডকুমেন্টেশন দেখুন।
নির্ভরতা সম্পর্কে আরও তথ্যের জন্য, বিল্ড নির্ভরতা যোগ করুন দেখুন।
প্রতিক্রিয়া
আপনার মতামত জেটপ্যাককে আরও উন্নত করতে সাহায্য করবে। আপনি যদি নতুন সমস্যা আবিষ্কার করেন অথবা এই লাইব্রেরি উন্নত করার জন্য কোন ধারণা থাকে তাহলে আমাদের জানান। নতুন একটি তৈরি করার আগে দয়া করে এই লাইব্রেরিতে বিদ্যমান সমস্যাগুলি একবার দেখে নিন। আপনি তারকা বোতামে ক্লিক করে বিদ্যমান সমস্যাটিতে আপনার ভোট যোগ করতে পারেন।
আরও তথ্যের জন্য ইস্যু ট্র্যাকার ডকুমেন্টেশন দেখুন।
সংস্করণ 3.4
সংস্করণ 3.4.0-beta01
১৭ ডিসেম্বর, ২০২৫
androidx.paging:paging-*:3.4.0-beta01 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-beta01-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
RecyclerViewএRecyclerViewএবংRefreshলোডের মধ্যে রেস ঠিক করুন যাIndexOutOfBoundsExceptionএর দিকে নিয়ে যায়। ক্রমাগতRefreshলোডের কারণে UI আপডেটে বাধাগ্রস্ত হলেRecyclerViewএর সাথে পেজিং অবস্থা বিচ্ছিন্ন হতে পারে। যদি একটি রিফ্রেশ বাধাগ্রস্ত হয় (অর্থাৎ একটানাRefreshলোডের কারণে) তাহলে পেজিংকে তার প্রি-রিফ্রেশ অবস্থায় রিসেট করে এটি ঠিক করা হয়। ( I771b0 , b/409809768 )
সংস্করণ 3.4.0-alpha04
১০ সেপ্টেম্বর, ২০২৫
androidx.paging:paging-*:3.4.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-alpha04-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
- টার্গেট পজিশনের সবচেয়ে কাছের এবং ইনপুট প্রিডিকেটের সাথে মেলে এমন লোড করা আইটেমটি পুনরুদ্ধার করার জন্য একটি নতুন
PagingStateAPIclosestItemAroundPositionযোগ করা হয়েছে। এটি আইটেম-ভিত্তিক রিফ্রেশ কী তৈরি করতে ব্যবহার করা যেতে পারে যেখানে আদর্শ অ্যাঙ্করেবল আইটেমটি কাছাকাছি থাকে কিন্তু সঠিক টার্গেট পজিশনে থাকে না। ( I96e5c , b/440187139 )
সংস্করণ 3.4.0-alpha03
২৭ আগস্ট, ২০২৫
androidx.paging:paging-*:3.4.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-alpha03-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
- পেজিং-কমন একটি নতুন কোটলিন মাল্টিপ্ল্যাটফর্ম (KMP) টার্গেট হিসেবে ডেস্কটপ যুক্ত করেছে। মোটের উপর এটি এখন JVM(Android এবং ডেস্কটপ), নেটিভ (Linux, iOS, watchOS, tvOS, macOS, MinGW), এবং ওয়েব (JavaScript, WasmJS) সমর্থন করে। ( Id2483 , b/436884811 )
- পেজিং-টেস্টিং নতুন কোটলিন মাল্টিপ্ল্যাটফর্ম (KMP) টার্গেট যুক্ত করেছে। মোটের উপর এটি এখন JVM (Android এবং Desktop), Native (Linux, iOS, watchOS, tvOS, macOS, MinGW) এবং Web (JavaScript, WasmJS) সমর্থন করে। ( I0c543 , b/435014650 )
- পেজিং-কম্পোজ নতুন কোটলিন মাল্টিপ্ল্যাটফর্ম (KMP) টার্গেট যুক্ত করেছে। মোটের উপর এটি এখন JVM (Android এবং Desktop), Native (Linux, iOS, watchOS, tvOS, macOS, MinGW) এবং Web (JavaScript, WasmJS) সমর্থন করে। ( I70d44 , b/436884801 )
API পরিবর্তনগুলি
- ডিফল্ট minSdk কে API 21 থেকে API 23 এ স্থানান্তর করা হচ্ছে ( Ibdfca , b/380448311 , b/435705964 , b/435705223 )
সংস্করণ 3.4.0-alpha02
৩০ জুলাই, ২০২৫
androidx.paging:paging-*:3.4.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-alpha02-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
PagingData.fromএখনplaceholdersBeforeএবংplaceholdersAfterসেট করার সুবিধা প্রদান করে। মনে রাখবেন যে এই স্থানধারকগুলির মধ্য দিয়ে স্ক্রোল করলে লোড ট্রিগার হয় না। ( I06983 )
সংস্করণ 3.4.0-alpha01
২ জুলাই, ২০২৫
androidx.paging:paging-*:3.4.0-alpha01 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-alpha01-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
- পেজিং নিম্নলিখিত KMP লক্ষ্যগুলি যোগ করেছে: watchos, tvos, mingwX64, watchosDeviceArm64, এবং linuxArm64। ( I237dd , Ia62b3 , b/368046982 , Icf15d , b/364652024 , I139d3 , b/338268719 )
বাগ ফিক্স
- পেজিং ৩.৩ বা তার পরবর্তী সংস্করণে অ্যান্ড্রয়েড ইউনিট পরীক্ষা করার ফলে আর
PagingLogger( Ia9400 , b/331684448 ) থেকে থ্রো করা হবে না। -
RecyclerViewআপডেট করার সময় ব্যবহারকারী স্ক্রোল করলেRecyclerViewIndexOutOfBoundsExceptionনিক্ষেপ করে এমন বাগ সংশোধন করা হয়েছে ( Id1f16 , b/381024738 ) - স্ক্রোল করার সময় রিফ্রেশ করার সময় পেজিং বেশি লোড ট্রিগার করতে না পারার সমস্যাটি সমাধান করা হয়েছে। ( I60ca5 , b/352586078 )
- পেজিং আইটেম রিফ্রেশ করার সময় স্ক্রোল করার সময় ক্র্যাশ ঠিক করা হয়েছে। ( I8c65a , b/347649763 )
সংস্করণ 3.3
সংস্করণ 3.3.6
১২ ফেব্রুয়ারী, ২০২৫
androidx.paging:paging-*:3.3.6 প্রকাশিত হয়েছে। সংস্করণ 3.3.6-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- প্রাথমিক রিফ্রেশের সময় প্রেরিত রিফ্রেশ এবং পুনরায় চেষ্টা সংকেতগুলি এখন সংরক্ষণ করা হবে এবং পেজিং উপস্থাপক প্রস্তুত হওয়ার পরে স্বয়ংক্রিয়ভাবে পুনরায় পাঠানো হবে।
বহিরাগত অবদান
সংস্করণ 3.3.5
১১ ডিসেম্বর, ২০২৪
androidx.paging:paging-*:3.3.5 প্রকাশিত হয়েছে। সংস্করণ 3.3.5-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
RecyclerViewআপডেট করার সময় ব্যবহারকারী স্ক্রোল করলেRecyclerViewIndexOutOfBoundsExceptionনিক্ষেপ করে এমন বাগ সংশোধন করা হয়েছে। ( Id1f16 , b/381024738 )
সংস্করণ 3.3.4
১৩ নভেম্বর, ২০২৪
androidx.paging:paging-*:3.3.4 প্রকাশিত হয়েছে। সংস্করণ 3.3.4-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- অ্যান্ড্রয়েড ইউনিট পরীক্ষায় পেজিং ৩.৩ বা তার পরবর্তী সংস্করণে টানার ফলে আর
Method isLoggable in android.util.Log not mockedমতো কোনও ত্রুটি দেখাবে না। ( Ia9400 , b/331684448 )
সংস্করণ 3.3.2
৭ আগস্ট, ২০২৪
androidx.paging:paging-*:3.3.2 প্রকাশিত হয়েছে। সংস্করণ 3.3.2-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
paging-commonএবংpaging-testingনতুন কোটলিন-মাল্টিপ্ল্যাটফর্ম লক্ষ্যবস্তু যুক্ত করেছে:watchos,tvos, এবংlinuxArm64( 90c9768 ), ( 53e0eca )
সংস্করণ 3.3.1
২৪ জুলাই, ২০২৪
androidx.paging:paging-*:3.3.1 প্রকাশিত হয়েছে। সংস্করণ 3.3.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- স্ক্রোল করার সময় ব্যাকিং ডেটা সোর্স রিফ্রেশ করলে
AsyncPagingDataDifferবা এর উপরে তৈরি API, যেমনPagingDataAdapterRecyclerViewলোড ট্রিগার করতে অক্ষম হবে এমন একটি সমস্যা সমাধান করা হয়েছে। ( I60ca5 , b/352586078 ) -
PagingDataAdapterঅথবাAsyncPagingDataDifferব্যবহার করেRecyclerViewস্ক্রোল করার সময় ব্যাকআপ ডেটা সোর্স থেকে আইটেমগুলি সরানোর সময় যে ক্র্যাশ ঘটে তা ঠিক করা হয়েছে। ( I8c65a , b/347649763 )
সংস্করণ 3.3.0
১৪ মে, ২০২৪
androidx.paging:paging-*:3.3.0 প্রকাশিত হয়েছে। সংস্করণ 3.3.0-এ এই কমিটগুলি রয়েছে।
৩.২.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
-
PagingDataPresenterএখন একটি পাবলিক ক্লাস। মাল্টিপ্ল্যাটফর্ম প্রেজেন্টারগুলি এখন অভ্যন্তরীণ Paging API বাpaging-runtimeএরAsyncPagingDataDifferএর পরিবর্তেPagingDataPresenterএর উপরে তৈরি করা যেতে পারে। -
LoadStatesত্রুটি বাNotLoadingঅবস্থায় আছে কিনা তা পরীক্ষা করার জন্য যথাক্রমেhasErrorএবংisIdleএ নতুনLoadStatesএবংCombinedLoadStatesসহায়ক পদ্ধতি যোগ করা হয়েছে। এছাড়াওFlow<CombinedLoadStates>এ একটি নতুনawaitNotLoading()Kotlin এক্সটেনশন পদ্ধতি যোগ করা হয়েছে যা লোডNotLoadingবা Error অবস্থায় স্থির না হওয়া পর্যন্ত অপেক্ষা করে। -
PagingData.empty()এখন ডিফল্টরূপেNotLoadingস্টেটগুলি প্রেরণ করে যদি না কাস্টমLoadStatesতার কনস্ট্রাক্টরে পাস করা হয়। এটি বিদ্যমান আচরণ থেকে সরে যায় যেখানে এটিPagingDataAdapterএ জমা দেওয়ার সময়LoadStatesপ্রেরণ করে না অথবা এটিLazyPagingItemsহিসাবে সংগ্রহ করার সময় Loading স্টেটগুলি প্রেরণ করে।LazyPagingItemsহিসাবে সংগ্রহ করা হলে, এটি এখন প্রাথমিক রচনার সাথে সাথেই একটি খালি তালিকাও প্রদর্শন করবে।
কোটলিন মাল্টিপ্ল্যাটফর্ম সামঞ্জস্যতা
পেজিং এখন কোটলিন মাল্টিপ্ল্যাটফর্মের সাথে সামঞ্জস্যপূর্ণ শিল্পকর্ম সরবরাহ করে, মূলত ক্যাশঅ্যাপের মাল্টিপ্ল্যাটফর্ম-পেজিং প্রকল্পের আপস্ট্রিম করা কাজের জন্য ধন্যবাদ।
-
paging-commonসমস্ত পেজিং 3 এপিআইকেcommon-এ স্থানান্তরিত করেছে এবং এখন অ্যান্ড্রয়েডের পাশাপাশি jvm এবং iOS-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-testingএর কোডটিcommon-এ স্থানান্তরিত হয়েছে এবং এখন অ্যান্ড্রয়েডের পাশাপাশি jvm এবং iOS-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-composeতার কোডটিcommon-এ স্থানান্তরিত করেছে এবংandroidx.composeএর মাল্টিপ্ল্যাটফর্ম সাপোর্টের সাথে মিলে একটি অ্যান্ড্রয়েড আর্টিফ্যাক্ট সরবরাহ করেছে। -
paging-runtime,paging-guava,paging-rxjava2, এবংpaging-rxjava3শুধুমাত্র Android হিসেবেই থাকবে।
সংস্করণ 3.3.0-rc01
১ মে, ২০২৪
androidx.paging:paging-*:3.3.0-rc01 পেজিং 3.3.0-beta01-এ কোনও পরিবর্তন ছাড়াই প্রকাশিত হয়েছে। সংস্করণ 3.3.0-rc01-এ এই কমিটগুলি রয়েছে।
সংস্করণ 3.3.0-beta01
৩ এপ্রিল, ২০২৪
androidx.paging:paging-*:3.3.0-beta01 কোনও উল্লেখযোগ্য পরিবর্তন ছাড়াই প্রকাশিত হয়েছে। সংস্করণ 3.3.0-beta01-এ এই কমিটগুলি রয়েছে।
সংস্করণ 3.3.0-alpha05
২০ মার্চ, ২০২৪
androidx.paging:paging-*:3.3.0-alpha05 প্রকাশিত হয়েছে। সংস্করণ 3.3.0-alpha05-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
- পেজিং এখন সাধারণ কোডের জন্য AndroidX অ্যানোটেশন
@MainThreadঅ্যানোটেশন ব্যবহার করে। ( I78f0d , b/327682438 )
সংস্করণ 3.3.0-alpha04
৬ মার্চ, ২০২৪
androidx.paging:paging-*:3.3.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 3.3.0-alpha04-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- কোটলিন মাল্টিপ্ল্যাটফর্ম সামঞ্জস্যতা সংযোজনের সাথে সম্পর্কিত ছোটখাটো ডকুমেন্টেশন ত্রুটিগুলি সংশোধন করা হয়েছে। ( aosp/2950785 )
সংস্করণ 3.3.0-alpha03
৭ ফেব্রুয়ারী, ২০২৪
androidx.paging:paging-*:3.3.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.3.0-alpha03-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
PagingDataPresenterএখন একটি পাবলিক ক্লাস। মাল্টিপ্ল্যাটফর্ম প্রেজেন্টারগুলি এখন অভ্যন্তরীণ Paging API বাpaging-runtimeএরAsyncPagingDataDifferএর প্রয়োজনের পরিবর্তেPagingDataPresenterএর উপরে তৈরি করা যেতে পারে। ( Id1f74 , b/315214786 ) -
LoadStatesত্রুটি বাNotLoadingঅবস্থায় আছে কিনা তা পরীক্ষা করার জন্য নতুনLoadStatesএবংCombinedLoadStatesসহায়ক পদ্ধতি যোগ করা হয়েছে। এছাড়াও একটি নতুন API যোগ করা হয়েছে যাLoadStateFlowএ অপেক্ষা করে যতক্ষণ না একটি লোডNotLoadingবা Error অবস্থায় স্থির হয়। ( Id6c67 )
আচরণ পরিবর্তন
-
PagingData.empty()এখন ডিফল্টরূপেNotLoadingস্টেটগুলি প্রেরণ করে যদি না কাস্টমLoadStatesতার কনস্ট্রাক্টরে পাস করা হয়। এটি বিদ্যমান আচরণ থেকে সরে যায় যেখানে এটিPagingDataAdapterএ জমা দেওয়ার সময়LoadStatesপ্রেরণ করে না অথবাLazyPagingItemsহিসাবে সংগ্রহ করা হলে এটি Loading স্টেটগুলি প্রেরণ করে।LazyPagingItemsহিসাবে সংগ্রহ করা হলে, এটি এখন প্রাথমিক রচনার সাথে সাথেই একটি খালি তালিকা প্রদর্শন করবে। ( I4d11d , b/301833847 )
সংস্করণ 3.3.0-alpha02
২০ সেপ্টেম্বর, ২০২৩
androidx.paging:paging-*:3.3.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 3.3.0-alpha02-এ এই কমিটগুলি রয়েছে।
কোটলিন মাল্টিপ্ল্যাটফর্ম সামঞ্জস্যতা
পেজিং এখন কোটলিন মাল্টিপ্ল্যাটফর্মের সাথে সামঞ্জস্যপূর্ণ শিল্পকর্ম সরবরাহ করে, মূলত ক্যাশঅ্যাপের মাল্টিপ্ল্যাটফর্ম-পেজিং প্রকল্পের আপস্ট্রিমড কাজের জন্য ধন্যবাদ। এটি আমাদের দুটি রিপোজিটরির মধ্যে বিচ্যুতি এড়াতে এবং তাদের সামঞ্জস্যপূর্ণ রাখতে সাহায্য করবে।
-
paging-commonসমস্ত পেজিং 3 এপিআইকেcommon-এ স্থানান্তরিত করেছে এবং এখন অ্যান্ড্রয়েডের পাশাপাশি jvm এবং iOS-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-testingএর কোডটিcommon-এ স্থানান্তরিত হয়েছে এবং এখন অ্যান্ড্রয়েডের পাশাপাশি jvm এবং iOS-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-composeতার কোডটিcommon-এ স্থানান্তরিত করেছে এবংandroidx.composeএর মাল্টিপ্ল্যাটফর্ম সাপোর্টের সাথে মিলে একটি অ্যান্ড্রয়েড আর্টিফ্যাক্ট সরবরাহ করেছে। -
paging-runtime,paging-guava,paging-rxjava2, এবংpaging-rxjava3শুধুমাত্র Android হিসেবেই থাকবে।
API পরিবর্তনগুলি
- শুধুমাত্র অভ্যন্তরীণ ব্যবহারের জন্য তৈরি পাবলিক লগার ইন্টারফেসটি অবচিত করা হয়েছে ( I16e95 , b/288623117 )
বহিরাগত অবদান
- কোটলিন মাল্টিপ্ল্যাটফর্মে পেজিং স্থানান্তর করতে সাহায্য করার জন্য ক্যাশ অ্যাপ থেকে ভেন্ডানকে ধন্যবাদ ( #560 , #561 , #562 , # 573 , #576 , #577 , #578 , #579 , #580 , #581 , #583 , #584 , #586 , #609 )
সংস্করণ 3.3.0-alpha01
২০ সেপ্টেম্বর, ২০২৩
- এটি androidx.paging লাইব্রেরির প্রথম মাল্টিপ্ল্যাটফর্ম রিলিজ। এই সংস্করণে শুধুমাত্র
*-jvmএবং*-androidআর্টিফ্যাক্ট রয়েছে। macOS, iOS এবং linux ভেরিয়েন্টের জন্য,3.3.0-alpha02ব্যবহার করুন।
সংস্করণ 3.2
সংস্করণ 3.2.1
৬ সেপ্টেম্বর, ২০২৩
androidx.paging:paging-*:3.2.1 প্রকাশিত হয়েছে। সংস্করণ 3.2.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
PagingData.from(List)ব্যবহার করে তৈরি একটি Flow পাস করার সময় Paging Testing artifact এরasSnapshot()API হ্যাং হয়ে যাওয়ার সমস্যা সমাধান করা হয়েছে কারণasSnapshot()লোডিং কখন শেষ হবে সে সম্পর্কে কোনও তথ্য দেবে না (PagingData.from(List, LoadStates)ওভারলোডের বিপরীতে)। এই সমাধানটি শুধুমাত্র completable Flows (যেমন,flowOf(PagingData.from(...))) এর জন্য কাজ করে। অ-completable Flows (যেমন,MutableStateFlow,LoadStatesপ্রদানকারীPagingData.fromওভারলোড ব্যবহার করুন)। ( I502c3 ) - পেজিং কম্পোজ এখন অভ্যন্তরীণভাবে
AndroidUiDispatcher.Mainব্যবহার করে যাতে লোডিং সম্পূর্ণ হওয়ার সাথে সাথে একই ফ্রেমে নতুন ডেটা পাওয়া যায়। ( Ia55af )
সংস্করণ 3.2.0
২৬ জুলাই, ২০২৩
androidx.paging:paging-*:3.2.0 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-এ এই কমিটগুলি রয়েছে।
৩.১.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
- পেজিং কম্পোজ API স্থিতিশীলতা অর্জন করেছে এবং এটিকে পেজিংয়ের বাকি অংশের সাথে আবার মার্জ করা হয়েছে যেখানে এর সংস্করণটি এখন অন্যান্য সমস্ত পেজিং শিল্পকর্মের সাথে মেলে। 3.1.0 থেকে পরিবর্তনগুলির মধ্যে রয়েছে:
-
PagingData.from(fakeData)তৈরি করে এবং সেইPagingDataMutableStateFlow(যেমনMutableStateFlow(PagingData.from(listOf(1, 2, 3)))) তে মোড়ানোর মাধ্যমে জাল ডেটার তালিকার প্রিভিউ দেখার জন্য সহায়তা।collectAsLazyPagingItems()এর প্রিভিউয়ের জন্য রিসিভার হিসেবে এই প্রবাহটি@Previewcomposables-এ পাস করুন। -
LazyVerticalGridএবংHorizontalPagerএর মতো সমস্ত অলস লেআউটের পাশাপাশি Wear এবং TV লাইব্রেরি থেকে কাস্টম অলস উপাদানগুলির জন্য সমর্থন। এটি নতুন নিম্ন স্তরেরLazyPagingItemsএক্সটেনশন পদ্ধতিitemKeyএবংitemContentTypeএর মাধ্যমে অর্জন করা হয়েছে, যা আপনাকেLazyColumn,LazyVerticalGridএবংHorizontalPagerমতো API গুলিতে তাদের সমতুল্যগুলির জন্য ইতিমধ্যে বিদ্যমান স্ট্যান্ডার্ডitemsAPI গুলিতেkeyএবংcontentTypeপ্যারামিটারগুলি বাস্তবায়ন করতে সহায়তা করে। -
items(lazyPagingItems)এবংitemsIndexed(lazyPagingItems)যা শুধুমাত্রLazyListScopeসমর্থন করে, সেগুলো বন্ধ করে দেওয়া হয়েছে।
-
- নতুন
paging-testingআর্টিফ্যাক্ট যা আপনার অ্যাপের প্রতিটি স্তরের ইউনিট পরীক্ষা এবং বিচ্ছিন্নভাবে পেজিংয়ের সাথে এর ইন্টিগ্রেশনের উপর ভিত্তি করে ডিজাইন করা API প্রদান করে। উদাহরণস্বরূপ, এতে অন্তর্ভুক্ত রয়েছে-
TestPagerক্লাস যা আপনাকে পেজার এবং বাস্তব UI থেকে স্বাধীনভাবে আপনার নিজস্ব কাস্টমPagingSourceবাস্তবায়নের আচরণ যাচাই করতে দেয়। -
asPagingSourceFactoryএপিআই একটিFlow<List<Value>>অথবা একটি স্ট্যাটিকList<Value>কে একটিPagingSourceFactoryরূপান্তর করে যা পরীক্ষায় পেজারে পাস করা যেতে পারে -
Flow<PagingData<Value>>তেasSnapshotKotlin এক্সটেনশন, যাFlow<PagingData<Value>>কে সরাসরিList<Value>তে অনুবাদ করে।asSnapshot lambdaআপনাকেscrollToবাappendScrollWhileএর মতো API গুলির মাধ্যমে আপনার অ্যাপের UI অনুকরণ করতে দেয় যাতে আপনি আপনার পৃষ্ঠাযুক্ত ডেটার সেটের যেকোনো সময়ে ডেটার স্ন্যাপশট সঠিক কিনা তা যাচাই করতে পারেন।
-
- পেজিং ডিবাগিং তথ্য দুটি স্তরে প্রকাশ করার জন্য ডিফল্ট লগ যোগ করা হয়েছে:
VERBOSEএবংDEBUG। লগগুলিadb shell setprop log.tag.Paging [DEBUG|VERBOSE]কমান্ডের মাধ্যমে সক্রিয় করা যেতে পারে। এটি ভিউ সহ পেজিং বা কম্পোজ সহ পেজিং উভয়ের ক্ষেত্রেই প্রযোজ্য। -
PagingDataAdapterএবংAsyncPagingDataDifferএর জন্য কনস্ট্রাক্টর যোগ করা হয়েছে যাCoroutineDispatcherএর পরিবর্তেCoroutineContextগ্রহণ করে। - একটি নতুন
PagingSourceFactoryকার্যকরী ইন্টারফেস যোগ করা হয়েছে যা পূর্ববর্তী () ->PagingSourcelambdas এর তুলনায় আরও স্পষ্ট API পৃষ্ঠ প্রদান করে। এই কারখানাটি একটি পেজার চালু করতে ব্যবহার করা যেতে পারে।
সংস্করণ 3.2.0-rc01
২১ জুন, ২০২৩
androidx.paging:paging-*:3.2.0-rc01 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-rc01-এ এই কমিটগুলি রয়েছে।
বহিরাগত অবদান
- অ্যান্ড্রয়েড/জেভিএম স্পেসিফিকেশন থেকে পেজিংকে দূরে সরিয়ে দেওয়ার জন্য অবদান রাখার জন্য ভেন্ডানকে ধন্যবাদ। ( #553 , #554 , #555 , #559 )
সংস্করণ 3.2.0-beta01
৭ জুন, ২০২৩
androidx.paging:paging-*:3.2.0-beta01 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-beta01-এ এই কমিটগুলি রয়েছে।
পেজিং কম্পোজ
- পেজিং কম্পোজ আনুষ্ঠানিকভাবে API স্থিতিশীলতা অর্জন করেছে। এর ফলে, সংস্করণটি
1.0.0-alpha20থেকে আপডেট করা হয়েছে যা এখন অন্যান্য সমস্ত পেজিং আর্টিফ্যাক্টের সংস্করণের সাথে মিলে যায়।
API পরিবর্তনগুলি
- পেজিং কম্পোজ থেকে অবচিত
items(LazyPagingItems)এবংitemsIndexed(LazyPagingItems)API গুলি সরানো হয়েছে। তাদের প্রতিস্থাপন API গুলির উদাহরণের জন্য পেজিং কম্পোজ1.0.0-alpha20রিলিজ নোটগুলি দেখুন। ( I9626e )
সংস্করণ 3.2.0-alpha06
২৪ মে, ২০২৩
androidx.paging:paging-*:3.2.0-alpha06 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha06-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
- একটি নতুন
PagingSourceFactoryকার্যকরী ইন্টারফেস যোগ করা হয়েছে যা বিদ্যমান() -> PagingSourcelambdas এর চেয়ে আরও স্পষ্ট API পৃষ্ঠ সরবরাহ করে। এই কারখানাটি একটিPagerচালু করতে ব্যবহার করা যেতে পারে। ( I33165 , b/280655188 ) -
List<Value>.asPagingSourceFactory()এর নতুনpaging-testingAPI যোগ করা হয়েছে যাতে একটিPagingSourceFactoryপাওয়া যায় যা শুধুমাত্র একটি অপরিবর্তনীয় ডেটা তালিকা থেকে লোড হয়।Flow<List<Value>>এর বিদ্যমান এক্সটেনশনটি এখনও একাধিক প্রজন্মের স্ট্যাটিক ডেটার সাথে পরীক্ষার জন্য ব্যবহার করা উচিত। ( Id34d1 , b/280655188 )
API পরিবর্তনগুলি
- পেজিং-টেস্টিং-এর সমস্ত পাবলিক API-গুলিকে এখন
@VisibleForTestingদিয়ে টীকা করা হয়েছে যাতে নিশ্চিত করা যায় যে এই APIগুলি শুধুমাত্র পরীক্ষায় ব্যবহৃত হচ্ছে। ( I7db6e ) -
asSnapshotAPI-এর জন্য আরCoroutineScopeপাস করার প্রয়োজন নেই। এটি এখন ডিফল্টভাবে এর প্যারেন্ট স্কোপ থেকে উত্তরাধিকারসূত্রে প্রাপ্ত প্রসঙ্গ ব্যবহার করে। ( Id0a78 , b/282240990 ) - বাস্তব
Pagerকনস্ট্রাক্টর প্যারামিটারের ক্রম ( I6185a ) এর সাথে স্বজ্ঞাতভাবে মেলানোর জন্যTestPagerকনস্ট্রাক্টর প্যারামিটারগুলিকে পুনঃক্রম করা হয়েছে। - মাইগ্রেটেড পেজিং-টেস্টিং-এ ল্যাম্বডা টাইপ
() -> PagingSource<Key, Value>ব্যবহার করেPagingSourceFactory<Key, Value>টাইপ করুন। ( I4a950 , b/280655188 )
আচরণগত পরিবর্তন
- প্রধান প্রেরণকারীকে আর
asSnapshotপেজিং পরীক্ষা চালানোর প্রয়োজন নেই। এটি সেট করলে আর পরীক্ষার আচরণে কোনও পরিবর্তন হয় না। ( Ie56ea )
সংস্করণ 3.2.0-alpha05
৩ মে, ২০২৩
androidx.paging:paging-*:3.2.0-alpha05 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha05-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
asSnapshotএর পেজিং টেস্টিং API এখন তারloadOperationsপ্যারামিটারকে একটি খালি ল্যাম্বডায় ডিফল্ট করে। এটি প্রাথমিক রিফ্রেশ লোড থেকে ডেটা পুনরুদ্ধারের জন্য কোনও লোড অপারেশন পাস না করেasSnapshotকল করার অনুমতি দেয়। ( Ied354 , b/277233770 )
ডকুমেন্টেশন উন্নতি
-
asPagingSourceFactory()এর ডকুমেন্টেশন আপডেট করা হয়েছে যাতে স্পষ্ট করা যায় যে এটি একটিFlowএর এক্সটেনশন পদ্ধতি যাPagingSourceইনস্ট্যান্স তৈরির জন্য একটি পুনঃব্যবহারযোগ্য কারখানা প্রদান করে। ( I5ff4f , I705b5 ) - জাম্পিং সমর্থন করার জন্য
itemsBeforeএবংitemsAfterওভাররাইড করার প্রয়োজনীয়তা স্পষ্ট করার জন্যLoadResult.Pageকনস্ট্রাক্টরের ডকুমেন্টেশন আপডেট করা হয়েছে। ( Ied354 )
বহিরাগত অবদান
- অ্যান্ড্রয়েড/জেভিএম স্পেসিফিকেশন থেকে পেজিংকে দূরে সরিয়ে দেওয়ার জন্য অবদান রাখার জন্য ভেন্ডানকে ধন্যবাদ। ( #525 , #523 , #520 , #519 , # 507 , # 506 , #505 , #499 , #497 , #496 , #493 )
সংস্করণ 3.2.0-alpha04
৮ ফেব্রুয়ারী, ২০২৩
androidx.paging:paging-*:3.2.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha04-এ এই কমিটগুলি রয়েছে।
পেজিং পরীক্ষা
-
paging-testingআর্টিফ্যাক্টটিতে এখন একটিasPagingSourceFactoryপদ্ধতি রয়েছে যা একটিFlow<List<Value>>থেকে একটিpagingSourceFactoryতৈরি করে যা একটি পেজারে সরবরাহ করা হবে। Flow থেকে নির্গত প্রতিটিList<Value>>পেজড ডেটার একটি প্রজন্মকে প্রতিনিধিত্ব করে। এটি পেজারের সংগ্রহের জন্য একটি ডেটা সোর্স তৈরি করে, উদাহরণস্বরূপ,PagingDataরূপান্তরের উপর পেজিং পরীক্ষাগুলিকে সহজতর করে। ( I6f230 , b/235528239 ) paging-testingআর্টিফ্যাক্টটি নতুন API দিয়ে সম্প্রসারিত করা হয়েছে যাFlow<PagingData<T>>সাথে থাকা ডেটা সঠিক কিনা তা যাচাই করার জন্য উপযুক্ত। উদাহরণস্বরূপ, এটি আপনার ViewModel স্তর থেকেFlow<PagingData<T>>এর আউটপুট নিশ্চিত করার জন্য ব্যবহার করা যেতে পারে।এটি
Flow<PagingData<Value>>তেasSnapshotKotlin এক্সটেনশনের মাধ্যমে করা হয়, যাFlow<PagingData<Value>>কে সরাসরিList<Value>তে অনুবাদ করে।asSnapshotlambda আপনাকেscrollToবাappendScrollWhileএর মতো API গুলির মাধ্যমে আপনার অ্যাপের UI অনুকরণ করতে দেয় যাতে পুনরাবৃত্তিযোগ্য এবং সামঞ্জস্যপূর্ণ হয় যাতে আপনি আপনার পৃষ্ঠাযুক্ত ডেটার সেটের যেকোনো সময়ে ডেটার স্ন্যাপশট সঠিক কিনা তা যাচাই করতে পারেন।// Create your ViewModel instance val viewModel = … // Get the Flow of PagingData from the ViewModel val data< Flow<PagingData<String>> = viewModel.data val snapshot: List<String> = data.asSnapshot { // Each operation inside the lambda waits for the data to settle before continuing scrollTo(index = 50) // While you can’t view the items within the asSnapshot call, // you can continuously scroll in a direction while some condition is true // i.e., in this case until you hit a placeholder item appendScrollWhile { item: String -> item != “Header 1” } } // With the asSnapshot complete, you can now verify that the snapshot // has the expected valuesasSnapshotহল একটিsuspendপদ্ধতি যাrunTestমধ্যে চালানো হবে বলে আশা করা হচ্ছে। আরও তথ্যের জন্য Android এ Kotlin coroutines পরীক্ষা করা দেখুন। ( I55fd2 , I5bd26 , I7ce34 , I51f4d , I2249f , Id6223 , Ic4bab , Ib29b9 , Ic1238 , I96def , b/235528239 )
API পরিবর্তনগুলি
-
AsyncPagingDataDifferএবংPagingDataAdapterএgetItemএবংpeekএ UI কলগুলি এখন সঠিকভাবে প্রধান থ্রেডে শুধুমাত্র কলযোগ্য হিসাবে চিহ্নিত করা হয়েছে। ( I699b6 ) -
TestPagerদ্বারা ব্যবহৃত জেনেরিক প্রকারগুলি থেকে ওয়াইল্ডকার্ডগুলি সরানো হয়েছে, যার ফলে জাভা প্রোগ্রামিং ভাষায় লেখা কোডে সেই পদ্ধতিগুলির ফলাফল ব্যবহার করা সহজ হয়েছে। ( I56c42 )
সংস্করণ 3.2.0-alpha03
২৪ অক্টোবর, ২০২২
androidx.paging:paging-*:3.2.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha03-এ এই কমিটগুলি রয়েছে।
পেজিং পরীক্ষা
এই রিলিজে একটি নতুন আর্টিফ্যাক্ট রয়েছে: paging-testing । এই আর্টিফ্যাক্টটি আপনার অ্যাপের প্রতিটি স্তরের ইউনিট টেস্টিং এবং আইসোলেশনে পেজিংয়ের সাথে এর ইন্টিগ্রেশনের উপর ভিত্তি করে ডিজাইন করা API প্রদান করে।
উদাহরণস্বরূপ, এই প্রথম রিলিজে একটি TestPager ক্লাস রয়েছে যা আপনাকে আপনার নিজস্ব কাস্টম PagingSource বাস্তবায়নের আচরণ যাচাই করতে দেয় Pager এবং বাস্তব UI থেকে স্বাধীনভাবে যা আপনার সাধারণত এন্ড-টু-এন্ড Paging ইন্টিগ্রেশন সিমুলেট করার জন্য প্রয়োজন।
TestPager একটি নকল হিসেবে বিবেচনা করা উচিত - একটি টেস্ট ডাবল যা PagingSource পরীক্ষা করার জন্য একটি সরলীকৃত API পৃষ্ঠ প্রদান করে এবং Pager আসল বাস্তবায়নকে প্রতিফলিত করে। এই API গুলি হল suspend API এবং Android এ Kotlin coroutines পরীক্ষা করার নির্দেশিকা অনুসারে runTest এর মধ্যে চালানো উচিত।
ব্যবহৃত এই API গুলির একটি উদাহরণ room-paging পরীক্ষাগুলিতে পাওয়া যাবে, যেগুলিকে TestPager ব্যবহার করার জন্য পুনঃফ্যাক্টর করা হয়েছিল।
API পরিবর্তনগুলি
-
LoadResult.Page.iterator()এর মাধ্যমেLoadResult.Page.dataএর উপর সুবিধাজনক পুনরাবৃত্তি সক্ষম করে। এটি পরোক্ষভাবে Kotlin স্ট্যান্ডার্ড লাইব্রেরিflattenপদ্ধতি ব্যবহারের অনুমতি দেয় যখনList<LoadResult.Page>দেওয়া হয়, যেমনPagingStateএরpagesসম্পত্তি যাPagingSource.getRefreshKeyপদ্ধতিতে পাস করা হয়। ( Ie0718 )
সংস্করণ 3.2.0-alpha02
১০ আগস্ট, ২০২২
androidx.paging:paging-*:3.2.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha02-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
- পেজিং এখন
AsyncPagingDataDifferবাPagingDataAdapterক্লাসের মাধ্যমে লগ সরবরাহ করে যাতেPagingDataথেকে সংগৃহীত ডিবাগিং তথ্য প্রকাশ করা যায়। - লগগুলি
adb shellকমান্ডadb shell setprop log.tag.Paging [DEBUG|VERBOSE].( b/235527159 )
বাগ ফিক্স
- রানটাইম
paging-runtime:3.1.1বা তার বেশি বয়সীদের সাথেpaging-common:3.2.0-alpha01ব্যবহার করার সময় অনুপস্থিতPagingDataDifferকনস্ট্রাক্টর ত্রুটিটি ঠিক করা হয়েছে। ( b/235256201 )
সংস্করণ 3.2.0-alpha01
১ জুন, ২০২২
androidx.paging:paging-*:3.2.0-alpha01 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha01-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
PagingDataAdapterএবংAsyncPagingDataDifferএর জন্য কনস্ট্রাক্টর যোগ করা হয়েছে যাCoroutineDispatcherএর পরিবর্তেCoroutineContextগ্রহণ করে। ( Idc878 ) - ডিফল্টরূপে,
PagingData.from()এবংPagingData.empty()উপস্থাপক পক্ষেরCombinedLoadStatesপ্রভাবিত করবে না।LoadStatesসম্পূর্ণ টার্মিনাল (অর্থাৎ,NotLoading(endOfPaginationReached = false)) হিসেবে সেট করার বিদ্যমান আচরণ বজায় রাখার জন্য একটি নতুন ওভারলোড যোগ করা হয়েছে, যাতে প্রয়োজনে দূরবর্তী অবস্থাও অন্তর্ভুক্ত করার বিকল্প রয়েছে। যদিLoadStatesপাস না করা হয়, তাহলেsourceLoadStatesremoteLoadStatesগ্রহণ করার সময় পূর্ববর্তীCombinedLoadStatesউপস্থাপক পক্ষের উপর বজায় থাকবে। ( Ic3ce5 , b/205344028PagingData
বাগ ফিক্স
-
PagingSource.getRefreshKey()এর ফলাফল এখনinitialKeyএর উপর সঠিকভাবে প্রাইওটাইজ করা হয়েছে যেখানে এটি null রিটার্ন করবে, কিন্তু একটি non-nullinitialKeyসেট করা ছিল। ( Ic9542 , b/230391606 )
বহিরাগত অবদান
- test-coroutines-lib মাইগ্রেশনের কারণে আপডেট করা হয়েছে :compose:ui:ui-test api (updateApi) ( I3366d )
সংস্করণ 3.1
সংস্করণ 3.1.1
৯ মার্চ, ২০২২
androidx.paging:paging-*:3.1.1 প্রকাশিত হয়েছে। সংস্করণ 3.1.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
.cachedIn()দ্বারা ভুলভাবে সন্নিবেশ করানো প্রজন্মের মধ্যে মধ্যবর্তীLoadState.NotLoadingইভেন্টগুলি সরানো হয়েছে। এই পরিবর্তনটি ব্যর্থ লোডগুলি পুনরায় চেষ্টা করার সময়, রিফ্রেশ করার সময় বা অবৈধকরণের সময় তৈরি হওয়া অপ্রয়োজনীয়LoadState.NotLoadingইভেন্টগুলি সরিয়েLoadStateপরিবর্তনগুলিতে প্রতিক্রিয়া করা অনেক সহজ করে তোলে।
সংস্করণ 3.1.0
১৭ নভেম্বর, ২০২১
androidx.paging:paging-*:3.1.0 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-এ এই কমিটগুলি রয়েছে।
৩.০.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
-
Flow<PagingData>.observableএবংFlow<PagingData>.flowableAPI গুলি আর পরীক্ষামূলক নয় - আচরণ
LoadStateএ পরিবর্তিত হয়:-
endOfPaginationReachedএখনPagingSourceএবংRemoteMediatorউভয়ের জন্যLoadType.REFRESHক্ষেত্রে সর্বদাfalse - পেজিং থেকে
LoadStatesএখন ডাউনস্ট্রিম নির্গত হওয়ার আগেPagingSourceএবংRemoteMediatorউভয়ের কাছ থেকে বৈধ মানের জন্য অপেক্ষা করছে।PagingDataনতুন প্রজন্ম এখন সবসময় সঠিকভাবে রিফ্রেশ স্টেটের জন্যLoadingদিয়ে শুরু করবে, কিছু ক্ষেত্রে ভুলভাবেNotLoadingএ রিসেট করার পরিবর্তে। - প্রেজেন্টার API-তে
.loadStateFlowএবং.addLoadStateListenerআর অপ্রয়োজনীয়ভাবে একটি প্রাথমিকCombinedLoadStatesপাঠায় না যার মধ্যস্থতাকারী অবস্থা সর্বদাnullএ সেট করা থাকে।
-
- অতীত প্রজন্মের উপর বাতিলকরণ এখন অবৈধকরণ / নতুন প্রজন্মের উপর উৎসাহের সাথে ঘটে।
Flow<PagingData>এ.collectLatestব্যবহার করার আর প্রয়োজন হবে না, যদিও এটি এখনও করার পরামর্শ দেওয়া হয়। -
PagingSource.LoadResult.InvalidPagingSource.loadথেকে একটি নতুন রিটার্ন টাইপ হিসেবে যোগ করা হয়েছে, যার ফলে Paging এইPagingSourceএ যেকোনো মুলতুবি থাকা বা ভবিষ্যতের লোড অনুরোধ বাতিল করে দেয় এবং এটিকে অবৈধ করে দেয়। এই রিটার্ন টাইপটি ডাটাবেস বা নেটওয়ার্ক থেকে ফেরত পাঠানো যেতে পারে এমন সম্ভাব্য অবৈধ বা পুরানো ডেটা পরিচালনা করার জন্য ডিজাইন করা হয়েছে। -
.onPagesPresentedএবং.addOnPagesUpdatedListenerপ্রেজেন্টার API যোগ করা হয়েছে যা UI-তে পৃষ্ঠাগুলি উপস্থাপন করার সাথে সাথে সিঙ্ক্রোনাসভাবে ট্রিগার হয়েছে। পৃষ্ঠা আপডেট নিম্নলিখিত পরিস্থিতিতে ঘটতে পারে:- নতুন প্রজন্মের পেজিংডেটার প্রাথমিক লোড সম্পূর্ণ হয়, নতুন প্রজন্মের উপস্থাপিত আইটেমগুলিতে কোনও পরিবর্তন থাকুক না কেন। অর্থাৎ, তালিকাটি ঠিক একই থাকার কারণে কোনও আপডেট ছাড়াই প্রাথমিক লোড সম্পূর্ণ করা একটি নতুন প্রজন্ম এখনও এই কলব্যাকটি ট্রিগার করবে।
- একটি পৃষ্ঠা সন্নিবেশ করানো হয়, এমনকি যদি সন্নিবেশ করা পৃষ্ঠায় কোনও নতুন আইটেম না থাকে।
- একটি পৃষ্ঠা বাদ দেওয়া হয়, এমনকি যদি বাদ দেওয়া পৃষ্ঠাটি খালি থাকে।
সংস্করণ 3.1.0-rc01
৩ নভেম্বর, ২০২১
androidx.paging:paging-*:3.1.0-rc01 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-rc01-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- .cachedIn() তে রেস কন্ডিশন + মেমোরি লিক ঠিক করা হয়েছে যেখানে পর্যবেক্ষক না থাকাকালীন অথবা পর্যবেক্ষক যখন একটি নতুন PagingData তে স্যুইচ করছেন তখন Paging ডাউনস্ট্রিম দ্বারা একাধিক লোড ইভেন্ট পাঠানো হয়েছিল। ( Ib682e )
সংস্করণ 3.1.0-beta01
১৩ অক্টোবর, ২০২১
androidx.paging:paging-*:3.1.0-beta01 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-beta01-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- প্রিফেচডিস্ট্যান্সে অনেক দ্রুত আইটেম অ্যাক্সেসের ফলে সেগুলো বাদ পড়ার সমস্যা সমাধান করা হয়েছে, যার ফলে পৃষ্ঠা লোড স্থগিত হয়ে যেতে পারে। এটি বিশেষ করে এমন একটি সমস্যা যেখানে অনেক আইটেম একসাথে এমন একটি ক্রমে সাজানো থাকে যা ব্যবহারকারীর স্ক্রোলের দিকের সাথে লোডিংকে অগ্রাধিকার দেবে। এই আইটেম অ্যাক্সেসগুলি এখন বাফার করা হয় এবং বাদ পড়া রোধ করার জন্য সিঙ্ক্রোনাসভাবে অগ্রাধিকার দেওয়া হয়। ( aosp/1833273 )
সংস্করণ 3.1.0-alpha04
২৯ সেপ্টেম্বর, ২০২১
androidx.paging:paging-*:3.1.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-alpha04-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
Flow<PagingData>.observableএবংFlow<PagingData>.flowableAPI গুলি আর পরীক্ষামূলক নয়। ( Ie0bdd )
বাগ ফিক্স
- LoadStates-এর ক্ষেত্রে,
LoadType.REFRESHক্ষেত্রেendOfPaginationReachedএখন সর্বদাfalse। পূর্বে, RemoteMediatorREFRESHএর ক্ষেত্রে endOfPaginationReachedtrueবলে প্রমাণিত হত, কিন্তু PagingSource-এর ক্ষেত্রে তা সম্ভব ছিল না। এই আচরণটি এখন সর্বদাfalseফেরত দেওয়ার জন্য একত্রিত হয়েছে কারণ REFRESH-কে টার্মিনাল হিসেবে বিবেচনা করা কখনই যুক্তিসঙ্গত নয়, এবং এখন LoadStates-এ API চুক্তির অংশ হিসাবে নথিভুক্ত করা হয়েছে। পৃষ্ঠাঙ্কন বন্ধ করা হবে কিনা তা সিদ্ধান্ত নেওয়ার সময়, APPEND অথবা PREPEND নির্দেশাবলীর ক্ষেত্রে আপনার সর্বদা এটি করা উচিত। ( I047b6 ) পেজিং থেকে লোডস্টেটগুলি এখন প্রজন্মের মধ্যে ডাউনস্ট্রিম নির্গত করার আগে PagingSource এবং RemoteMediator উভয়ের বৈধ মানের জন্য অপেক্ষা করে। এটি PagingData-এর নতুন প্রজন্মকে CombinedLoadStates.source.refresh-এ NotLoading পাঠাতে বাধা দেয় যদি এটি ইতিমধ্যেই লোডিং ছিল; PagingData-এর নতুন প্রজন্ম এখন সর্বদা সঠিকভাবে রিফ্রেশ স্টেটের জন্য Loading দিয়ে শুরু করবে, কিছু ক্ষেত্রে ভুলভাবে NotLoading-এ রিসেট করার পরিবর্তে।
অতীত প্রজন্মের উপর বাতিলকরণ এখন অবৈধকরণ / নতুন প্রজন্মের উপর উৎসাহের সাথে ঘটে।
Flow<PagingData>এ .collectLatest ব্যবহার করার আর প্রয়োজন হবে না, যদিও এটি এখনও করার জন্য অত্যন্ত সুপারিশ করা হয়। ( I0b2b5 , b/177351336 , b/195028524 )প্রেজেন্টার API-তে
.loadStateFlowএবং.addLoadStateListenerআর অপ্রয়োজনীয়ভাবে একটি প্রাথমিকCombinedLoadStatesপাঠায় না যার মধ্যস্থতাকারী অবস্থা সর্বদাnullএ সেট করা থাকে এবং source স্টেটগুলিNotLoading(endOfPaginationReached = false)এ সেট করা থাকে। এর অর্থ হল:- আপনি যদি রিমোটমিডিয়েটর ব্যবহার করেন তবে মধ্যস্থতাকারী রাজ্যগুলি সর্বদা পূর্ণ থাকবে।
-
.loadStateFlowতে একটি নতুন loadState লিসেনার বা একটি নতুন কালেক্টর নিবন্ধন করলে তা আর তাৎক্ষণিকভাবে বর্তমান মান নির্গত করবে না যদি এটিPagingDataথেকে একটি প্রকৃতCombinedLoadStatesনা পায়। এটি ঘটতে পারে যদি কোনও কালেক্টর বা লিসেনারPagingDataজমা দেওয়ার আগে শুরু করে। ( I1a748 )
সংস্করণ 3.1.0-alpha03
২১ জুলাই, ২০২১
androidx.paging:paging-*:3.1.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-alpha03-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
PagingSource-এ LoadResult.Invalid নামে একটি তৃতীয় রিটার্ন টাইপ যোগ করা হয়। যখন একটি PagingSource.load LoadResult.Invalid রিটার্ন করে, তখন পেজিং লোড করা ডেটা বাতিল করে দেয় এবং PagingSource কে অবৈধ করে দেয়। এই রিটার্ন টাইপটি ডাটাবেস বা নেটওয়ার্ক থেকে ফেরত পাঠানো যেতে পারে এমন সম্ভাব্য অবৈধ বা পুরানো ডেটা পরিচালনা করার জন্য ডিজাইন করা হয়েছে।
উদাহরণস্বরূপ, যদি অন্তর্নিহিত ডাটাবেসটি লেখা হয় কিন্তু PagingSource সময়মতো অবৈধ না হয়, তাহলে এটি অসঙ্গত ফলাফল ফেরত দিতে পারে যদি এর বাস্তবায়নটি লোড করা ব্যাকিং ডেটাসেটের অপরিবর্তনীয়তার উপর নির্ভর করে (যেমন, LIMIT OFFSET স্টাইল db বাস্তবায়ন)। এই পরিস্থিতিতে, লোড করার পরে অবৈধতা পরীক্ষা করার এবং LoadResult.Invalid ফেরত দেওয়ার পরামর্শ দেওয়া হয়, যার ফলে Paging এই PagingSource-এ যেকোনো মুলতুবি বা ভবিষ্যতের লোড অনুরোধ বাতিল করে দেয় এবং এটি অবৈধ করে দেয়।
এই রিটার্ন টাইপটি Paging2 API দ্বারাও সমর্থিত যা LivePagedList বা RxPagedList ব্যবহার করে। Paging2 এর PagedList API গুলির সাথে PagingSource ব্যবহার করার সময়, PagedList তাৎক্ষণিকভাবে বিচ্ছিন্ন হয়ে যায়, এই PagedList এ ডেটা লোড করার আরও প্রচেষ্টা বন্ধ করে দেয় এবং PagingSource এ অবৈধকরণ ট্রিগার করে।
LoadResult একটি সিল করা ক্লাস, যার অর্থ এটি একটি সোর্স-অসঙ্গত পরিবর্তন, যার ফলে PagingSource.load ফলাফল ব্যবহার করে সরাসরি কেস ব্যবহার করলে কম্পাইলের সময় LoadResult.Invalid পরিচালনা করতে হবে। উদাহরণস্বরূপ, Kotlin ব্যবহারকারীরা যারা exhaustive-when to check return type ব্যবহার করেন তাদের Invalid type এর জন্য একটি চেক যোগ করতে হবে। ( Id6bd3 , b/191806126 , b/192013267 )
বাগ ফিক্স
- PagingSource.registerInvalidatedCallback অথবা DataSource.addInvalidatedCallback এর মাধ্যমে যোগ করা অবৈধকরণ কলব্যাকগুলি এখন স্বয়ংক্রিয়ভাবে ট্রিগার হয় যদি সেগুলি ইতিমধ্যেই অবৈধ ছিল এমন কোনও PagingSource / DataSource-এ নিবন্ধিত থাকে। এটি এমন একটি রেস শর্ত সমাধান করে যার ফলে পেজিং অবৈধকরণ সংকেতগুলি ড্রপ করে এবং প্রাথমিক লোডের সময় ইতিমধ্যেই অবৈধ ছিল এমন একটি সোর্স প্রদান করলে আটকে যায়। অতিরিক্তভাবে, অবৈধকরণ কলব্যাকগুলি এখন ট্রিগার হওয়ার পরে সঠিকভাবে সরানো হয় কারণ সেগুলি সর্বাধিক একবার কল করার নিশ্চয়তা রয়েছে। ( I27e69 )
- নতুন ইনস্ট্যান্টিয়েট করা PagedList স্ট্রিম, যেমন LivePagedListBuilder বা RxPagedListBuilder থেকে প্লেসহোল্ডারের প্রাথমিক মান (InitialPagedList) জমা দিলে আর পূর্বে লোড করা ডেটা সাফ হবে না।
সংস্করণ 3.1.0-alpha02
১ জুলাই, ২০২১
androidx.paging:paging-*:3.1.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-alpha02-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
onPagesPresented লিসেনার এবং ফ্লো প্রেজেন্টার API যোগ করা হয়েছে যা UI-তে উপস্থাপিত পৃষ্ঠাগুলি আপডেট হওয়ার সাথে সাথেই ট্রিগার করে।
যেহেতু এই আপডেটগুলি UI এর সাথে সিঙ্ক্রোনাস, তাই আপডেট প্রয়োগের পরে অবস্থা পরীক্ষা করার জন্য আপনি .snapshot, .getItemCount এর মতো অ্যাডাপ্টার পদ্ধতিগুলি ব্যবহার করতে পারেন। মনে রাখবেন যে .snapshot() কে স্পষ্টভাবে বলা হয়নি কারণ প্রতিটি আপডেটে এটি করা ব্যয়বহুল হতে পারে।
নিম্নলিখিত পরিস্থিতিতে পৃষ্ঠা আপডেট হতে পারে:
- নতুন প্রজন্মের পেজিংডেটার প্রাথমিক লোড সম্পূর্ণ হয়, নতুন প্রজন্মের উপস্থাপিত আইটেমগুলিতে কোনও পরিবর্তন থাকুক না কেন। অর্থাৎ, তালিকাটি ঠিক একই থাকার কারণে কোনও আপডেট ছাড়াই প্রাথমিক লোড সম্পূর্ণ করা একটি নতুন প্রজন্ম এখনও এই কলব্যাকটি ট্রিগার করবে।
- একটি পৃষ্ঠা সন্নিবেশ করানো হয়, এমনকি যদি সন্নিবেশ করা পৃষ্ঠায় কোনও নতুন আইটেম না থাকে
- একটি পৃষ্ঠা বাদ দেওয়া হয়, এমনকি যদি বাদ দেওয়া পৃষ্ঠাটি খালি থাকে ( I272c9 , b/189999634 )
বাগ ফিক্স
- LivePagedList বা RxPagedList দ্বারা উৎপাদিত প্রাথমিক মান থেকে PagedList.dataSource অ্যাক্সেস করলে আর ভুলভাবে IllegalStateException ( I96707 ) নিক্ষেপ করা হবে না।
সংস্করণ 3.1.0-alpha01
২ জুন, ২০২১
androidx.paging:paging-*:3.1.0-alpha01 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-alpha01-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
paging-rxjava3দ্বারা প্রদত্ত ক্লাসগুলি এখনandroidx.paging.rxjava3প্যাকেজের অধীনে থাকে যাতে তারাpaging-rxjava2( Ifa7f6 ) এর সাথে বিরোধ না করে।
বাগ ফিক্স
- পেজিং-এর কারণে মাঝে মাঝে নো-অপ ডিফার ইভেন্ট রিসাইক্লারভিউ-তে পাঠানোর সমস্যা সমাধান করা হয়েছে, যার ফলে কিছু শ্রোতাদের তাড়াতাড়ি ট্রিগার হতে পারে। ( Ic507f , b/182510751 )
বহিরাগত অবদান
- rxjava3 আর্টিফ্যাক্টে ( Id1ce2 , b/182497591 ) অবচিত PagedList compat API যোগ করা হয়েছে।
পেজিং কম্পোজ সংস্করণ 1.0.0
সংস্করণ 1.0.0-alpha20
২৪ মে, ২০২৩
androidx.paging:paging-compose:1.0.0-alpha20 প্রকাশিত হয়েছে। সংস্করণ 1.0.0-alpha20-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
- পেজিং কম্পোজ এখন
PagingData.from(fakeData)তৈরি করে এবং সেইPagingDataMutableStateFlow(যেমন,MutableStateFlow(PagingData.from(listOf(1, 2, 3)))) তে মোড়ানোর মাধ্যমে জাল ডেটার তালিকার প্রিভিউ দেখাতে সহায়তা করে। আপনার@Previewতে ইনপুট হিসেবে সেই ডেটা ব্যবহার করে,collectAsLazyPagingItems()এ কল করলে প্রিভিউযোগ্যLazyPagingItemsপাওয়া যাবে। ( I8a78d , b/194544557 )
বাগ ফিক্স
-
LazyPagingItemsএ সংগৃহীতpager.flow.cachedInথেকে ক্যাশ করা ডেটা এখন স্টেট পুনরুদ্ধারের পরে অবিলম্বে উপলব্ধ হবে, কোনও অ্যাসিঙ্ক্রোনাস সংগ্রহের প্রয়োজন হবে না। এর অর্থ হল স্টেট পুনরুদ্ধারের পরে প্রাথমিক রচনার সাথে সাথে ক্যাশ করা ডেটা উপস্থাপনার জন্য প্রস্তুত থাকবে। ( I97a60 , b/177245496 )
সংস্করণ 1.0.0-alpha19
৩ মে, ২০২৩
androidx.paging:paging-compose:1.0.0-alpha19 প্রকাশিত হয়েছে। সংস্করণ 1.0.0-alpha19-এ এই কমিটগুলি রয়েছে।
সমস্ত অলস লেআউট সমর্থন করে
Previously, Paging Compose provided custom items and itemsIndexed extensions on LazyListScope , which meant that you could not use Paging Compose with other lazy layouts like LazyVerticalGrid , HorizontalPager , or other custom lazy components provided by the Wear and TV libraries. Addressing this inflexibility is the primary update for this release.
To support more lazy layouts, we needed to build out APIs at a different layer - rather than providing a custom items API for each lazy layout, Paging Compose now provides slightly lower level extension methods on LazyPagingItems in itemKey and itemContentType . These APIs focus on helping you implement the key and contentType parameters to the standard items APIs that already exist for LazyColumn , LazyVerticalGrid as well as their equivalents in APIs like HorizontalPager . ( Ifa13b , Ib04f0 , b/259385813 )
This means that supporting a LazyVerticalGrid would look like:
// This part is unchanged
val lazyPagingItems = pager.collectAsLazyPagingItems()
LazyVerticalGrid(columns = GridCells.Fixed(2)) {
// Here we use the standard items API
items(
count = lazyPagingItems.itemCount,
// Here we use the new itemKey extension on LazyPagingItems to
// handle placeholders automatically, ensuring you only need to provide
// keys for real items
key = lazyPagingItems.itemKey { it.uniqueId },
// Similarly, itemContentType lets you set a custom content type for each item
contentType = lazyPagingItems.itemContentType { "contentType" }
) { index ->
// As the standard items call provides only the index, we get the item
// directly from our lazyPagingItems
val item = lazyPagingItems[index]
PagingItem(item = item)
}
}
For more examples of using these new APIs, please see our samples .
While these changes do make the LazyColumn and LazyRow examples a few lines longer, we felt that consistency across all lazy layouts was an important factor for those using Paging Compose going forward. For that reason, the existing extensions to LazyListScope have now been deprecated. ( I0c459 , I92c8f , b/276989796 )
API পরিবর্তনগুলি
- To ease the migration to the new APIs, the
itemsanditemsIndexedextension functions onLazyListScopenow support acontentTypeparameter, mirroring the support in the new APIs. ( Ib1918 , b/255283378 )
Dependency Updates
- Paging Compose has updated its dependency from Compose 1.0.5 to Compose 1.2.1. ( Ib1918 , b/255283378 )
Version 1.0.0-alpha18
৮ ফেব্রুয়ারী, ২০২৩
androidx.paging:paging-compose:1.0.0-alpha18 is released with no changes. Version 1.0.0-alpha18 contains these commits.
Version 1.0.0-alpha17
October 24, 2022
androidx.paging:paging-compose:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.
নতুন বৈশিষ্ট্য
- Add support for a custom
CoroutineContextwhen callingcollectLazyPagingItems. ( I7a574 , b/243182795 , b/233783862 )
Version 1.0.0-alpha16
১০ আগস্ট, ২০২২
androidx.paging:paging-compose:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.
নতুন বৈশিষ্ট্য
- Paging now provides logs via the
LazyPagingItemsclass to expose debugging information collected from PagingData. - The logs can be enabled via the
adb shellcommandadb shell setprop log.tag.Paging [DEBUG|VERBOSE]. ([b/235527159}(https://issuetracker.google.com/issues/235527159))
বাগ ফিক্স
- Fixed the missing
PagingDataDifferconstructor error when usingpaging-compose:1.0.0-alpha15withpaging-common:3.1.1or older.( b/235256201 , b/239868768 )
Version 1.0.0-alpha15
১ জুন, ২০২২
androidx.paging:paging-compose:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.
API পরিবর্তনগুলি
- Added constructors for
PagingDataAdapterandAsyncPagingDataDifferwhich acceptCoroutineContextinstead ofCoroutineDispatcher. ( Idc878 )
বাগ ফিক্স
-
LazyPagingItemsnow sets the initialloadStateto have aLoadState.Loadingrefresh. ( I55043 , b/224855902 )
Version 1.0.0-alpha14
১৩ অক্টোবর, ২০২১
androidx.paging:paging-compose:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.
Version 1.0.0-alpha13
২৯ সেপ্টেম্বর, ২০২১
androidx.paging:paging-compose:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.
API পরিবর্তনগুলি
-
LazyPagingItems.snapshot()function was replaced withLazyPagingItems.itemSnapshotListproperty ( Ie2da8 ) - Deprecated
LazyPagingItems.getAsState()was removed ( Ie65e4 )
সংস্করণ 1.0.0-alpha12
২১ জুলাই, ২০২১
androidx.paging:paging-compose:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.
API পরিবর্তনগুলি
-
items(lazyPagingItems)anditemsIndexed(lazyPagingItems)used to connect Paging withLazyColumn/Rownow accept the option key param which allows you to specify a stable key representing the item. You can read more about keys here. ( I7986d ) - Function
lazyPagingItems.getAsState(index)is now deprecated. UselazyPagingItems[index]instead. ( I086cb , b/187339372 )
সংস্করণ 1.0.0-alpha11
৩০ জুন, ২০২১
androidx.paging:paging-compose:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
সংস্করণ 1.0.0-alpha10
২ জুন, ২০২১
androidx.paging:paging-compose:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.
সংস্করণ 1.0.0-alpha09
১৮ মে, ২০২১
androidx.paging:paging-compose:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
বাগ ফিক্স
- LazyPagingItems' itemCount and item getter are now observable which allows it to be used with LazyVerticalGrid as well ( Ie2446 , b/171872064 , b/168285687 )
Compose Compatibility
-
androidx.paging:paging-compose:1.0.0-alpha09is only compatible with Compose version1.0.0-beta07and above.
সংস্করণ 1.0.0-alpha08
February 24, 2021
androidx.paging:paging-compose:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
Updated to integrate with Compose 1.0.0-beta01.
Version 1.0.0-alpha07
February 10, 2021
androidx.paging:paging-compose:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.
Updated to integrate with Compose alpha12.
Version 1.0.0-alpha06
২৮ জানুয়ারী, ২০২১
androidx.paging:paging-compose:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.
বাগ ফিক্স
Updated to depend on Compose 1.0.0-alpha11.
Version 1.0.0-alpha05
১৩ জানুয়ারী, ২০২১
androidx.paging:paging-compose:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.
Updated to depend on Compose 1.0.0-alpha10.
Version 1.0.0-alpha04
১৬ ডিসেম্বর, ২০২০
androidx.paging:paging-compose:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.
বাগ ফিক্স
- Updated the convenience properties,
CombinedLoadStates.refresh,CombinedLoadStates.prepend,CombinedLoadStates.appendto only transition fromLoadingtoNotLoadingafter both mediator and source load states areNotLoadingto ensure the remote update has been applied. ( I65619 )
সংস্করণ 1.0.0-alpha03
২ ডিসেম্বর, ২০২০
androidx.paging:paging-compose:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
- Updated to match Compose 1.0.0-alpha08.
সংস্করণ 1.0.0-alpha02
November 11, 2020
androidx.paging:paging-compose:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
API পরিবর্তনগুলি
- Added
.peek(),.snapshot(),.retry()and.refresh()methods toLazyPagingItems which expose the same functionality available inAsyncPagingDataDiffer/PagingDataAdapter( Iddfe8 , b/172041660 )
সংস্করণ 1.0.0-alpha01
২৮ অক্টোবর, ২০২০
androidx.paging:paging-compose:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
নতুন বৈশিষ্ট্য
The paging-compose artifact provides integration between The Paging Library and Jetpack Compose . A simple usage example:
@Composable
@OptIn(ExperimentalLazyDsl::class)
fun ItemsDemo(flow: Flow<PagingData<String>>) {
val lazyPagingItems = flow.collectAsLazyPagingItems()
LazyColumn {
items(lazyPagingItems) {
Text("Item is $it")
}
}
}
সংস্করণ 3.0.1
সংস্করণ 3.0.1
২১ জুলাই, ২০২১
androidx.paging:paging-*:3.0.1 is released. Version 3.0.1 contains these commits.
বাগ ফিক্স
- Accessing
PagedList.dataSourcefrom the initial value produced byLivePagedListorRxPagedListwill no longer incorrectly throw an IllegalStateException ( I96707 )
সংস্করণ 3.0.0
সংস্করণ 3.0.0
৫ মে, ২০২১
androidx.paging:paging-*:3.0.0 is released. Version 3.0.0 contains these commits.
Major features of 3.0.0
The majority of the existing API from Paging 2.xx has been deprecated in favor of the new Paging 3 APIs to bring the following improvements:
- First-class support for Kotlin coroutines and Flow
- Support for cancellation
- Built-in load state and error signals
- Retry + refresh functionality
- All three DataSource subclasses have been combined into a unified PagingSource class
- Custom page transformations including a built-in one for adding separators
- Loading state headers and footers
Version 3.0.0-rc01
২১ এপ্রিল, ২০২১
androidx.paging:paging-*:3.0.0-rc01 is released. Version 3.0.0-rc01 contains these commits.
বাগ ফিক্স
- Fixed an issue where Paging would sometimes send no-op differ events to RecyclerView, which could cause certain listeners to trigger early. ( Ic507f , b/182510751 )
Version 3.0.0-beta03
March 24, 2021
androidx.paging:paging-*:3.0.0-beta03 is released. Version 3.0.0-beta03 contains these commits.
বাগ ফিক্স
- We've revamped how placeholders are handled when list is reloaded to prevent unexpected jumps in RecyclerView. See NullPaddedDiffing.md for details. ( If1490 , b/170027529 , b/177338149 )
- The various PagedList builders (old compatibility path) no longer incorrectly synchronously call
DataSource.Factory.create()on Main thread when.build()is called. ( b/182798948 )
Version 3.0.0-beta02
১০ মার্চ, ২০২১
androidx.paging:paging-*:3.0.0-beta02 is released. Version 3.0.0-beta02 contains these commits.
API পরিবর্তনগুলি
- Rx3 extensions now correctly propagate
@ExperimentalCoroutinesApiOpt-In requirement. Previously they were marked on the@getmethod, which is ignored by the Kotlin Compiler due to: https://youtrack.jetbrains.com/issue/KT-45227 ( I5733c )
বাগ ফিক্স
- Enforce restrictions on public usage of experimental APIs ( I6aa29 , b/174531520 )
- Fixed a bug causing
PagingStateto always benullwhen remote refresh is called. - Fixed a bug where empty pages returned by PagingSource could prevent Paging from fetching again to fulfill
prefetchDistancecausing Paging to get “stuck”.
Version 3.0.0-beta01
February 10, 2021
androidx.paging:paging-*:3.0.0-beta01 is released. Version 3.0.0-beta01 contains these commits.
API পরিবর্তনগুলি
- Rx2 and Rx3 wrappers now expose the experimental annotation it depends on. If you are using the Rx compat wrappers in paging-rxjava2 or paging-rxjava3, you will now need to annotate usages with
@OptIn(ExperimentalCoroutinesApi::class)( Ib1f9d )
বাগ ফিক্স
- Fixed
IndexOutOfBoundsException: Inconsistency detectedsometimes thrown when using v2DataSourceAPIs through compatibility paths -
isInvalidcall during initialization ofDataSourcewhen used via compatibility paths are now correctly launched on fetchDispatcher instead of on the main thread. This fixes anIllegalStateExceptiondue to Db access on the main thread when using Room'sPagingSourceimplementation.
Version 3.0.0-alpha13
২৭ জানুয়ারী, ২০২১
androidx.paging:paging-*:3.0.0-alpha13 is released. Version 3.0.0-alpha13 contains these commits.
API পরিবর্তনগুলি
-
PagingSource.getRefreshKeyis no longer optional to implement, it is now an abstract function without a default implementation. Migrating users can either continue returning the default implementation, which simply returnsnull, butgetRefreshKey()should have a real implementation returning a key based on user's current scroll position that allows Paging to continue loading centered around the viewport viaPagingState.anchorPositionif possible. ( I4339a ) -
InvalidatingPagingSourceFactoryis now a final class ( Ia3b0a ) - Allow configuration of terminal separator (header / footer) behavior with an additional optional SeparatorType parameter. The two options are:
-
FULLY_COMPLETE- existing behavior; wait for both PagingSource and RemoteMediator to mark endOfPaginationReached before adding terminal separators. If RemoteMediator is not used, remote loadState is ignored. This is primarily useful if you only want to show section separators when the section is fully loaded, including fetching from remote source eg, network. -
SOURCE_COMPLETE- only wait for PagingSource to mark endOfPaginationReached even if RemoteMediator is used. This allows headers and footers to be presented synchronously with the initial load, which prevents users from needing to scroll to see terminal separators. ( Ibe993 , b/174700218 )
-
বাগ ফিক্স
- Fixed a rare memory leak which happens when a PagingSource is invalidated before PageFetcher can even begin to start loading from it. ( I9606b , b/174625633 )
Version 3.0.0-alpha12
১৩ জানুয়ারী, ২০২১
androidx.paging:paging-*:3.0.0-alpha12 is released. Version 3.0.0-alpha12 contains these commits.
API পরিবর্তনগুলি
- InvalidatingPagingSourceFactory is no longer an abstract class as it never had any abstract methods. ( I4a8c4 )
- Added an overload of .cachedIn() that accepts ViewModel instead of Lifecycle or CoroutineScope for Java users. ( I97d81 , b/175332619 )
- Allow Java callers to use PagingData transform operations in an async way, by accepting an Executor into transform operator arguments. All of the -Sync transform operators have the -Sync suffix removed now, and Kotlin Coroutine users will need to disambiguate by calling the extension function which accepts a suspending block instead. All PagingData transformation operators have been moved to extensions under the static PagingDataTransforms class. Java users will need to call them via static helpers eg,
PagingDataTransforms.map(pagingData, transform)For Kotlin users, the syntax is the same but you'll need to import the function. ( If6885 , b/172895919 )
বাগ ফিক্স
- Fixed a bug where
RemoteMediator.load()would not be called duringadapter.refresh()if the end of pagination had already been reached.
Version 3.0.0-alpha11
১৬ ডিসেম্বর, ২০২০
androidx.paging:paging-*:3.0.0-alpha11 is released. Version 3.0.0-alpha11 contains these commits.
নতুন বৈশিষ্ট্য
- Saved state support added for the following basic use cases (full support, especially in the layered source case is still a work in progress):
- flow is cached and application is not killed (eg flow is cached in a view model and activity is recreated in process)
- paging source is counted, placeholders are enabled and the layout is not staggered.
API পরিবর্তনগুলি
-
PagingSource.getRefreshKey()is now stable API ( I22f6f , b/173530980 ) -
PagingSource.invalidateis no longer an open function. If you need to get notified when invalidation happens, consider calling the registerInvalidatedCallback method instead of overriding invalidate. ( I628d9 , b/173029013 , b/137971356 ) - Pager now has a single experimental constructor alongside its regular constructors, rather than leaking experimental APIs into non-experimental public API via the opt-in annotation. ( I9dc61 , b/174531520 )
- Updated the convenience properties,
CombinedLoadStates.refresh,CombinedLoadStates.prepend,CombinedLoadStates.appendto only transition fromLoadingtoNotLoadingafter both mediator and source load states areNotLoadingto ensure the remote update has been applied. ( I65619 ) LoadParams.pageSize has been removed (it was already deprecated). The recommendation is to use
LoadParams.loadSizein your PagingSource.LoadParams.loadSizeis always equal to thePagingConfig.pageSizeexcept for the initial load call where it is equal to thePagingConfig.initialLoadSize.If you are testing your Paging2 DataSource without using a Pager or PagedList,
pageSizemay not match thePagingConfig.pageSizeif you are also settinginitialLoadSize. If it is important for your tests, try using a Pager/PagedList instead which will internally set the correct PageSize for your DataSource load methods. ( I98ac7 , b/149157296 )
বাগ ফিক্স
- Fixed a crash due to IllegalStateException when using separators with PagingConfig.maxSize set. ( I0ed33 , b/174787528 )
- Fixed a bug where load state for PREPEND / APPEND would not update to
NotLoading(endOfPaginationReached = true)immediately after initial load if RemoteMediator was set ( I8cf5a ) - Fixed a bug where presenter-side APIs such as .snapshot(), .peek(), etc., would return the previous (out-of-date) list within ListUpdateCallback updates.
- Fixed a bug where Separators operators would not add headers or footers when used with RemoteMediator
- Fixed a bug where LoadState updates to NotLoading for RemoteMediator would get stuck in the Loading state
- Fixed a bug where the Paging2.0 compatibility API,
.asPagingSourceFactory(), could cause the backingDataSourceto be initialized on the incorrect CoroutineDispatcher. This resolves a crash and possible ANR cases, especially when using Room's current implementation of PagingSource, which uses this compatibility path.
Version 3.0.0-alpha10
২ ডিসেম্বর, ২০২০
androidx.paging:paging-*:3.0.0-alpha10 is released. Version 3.0.0-alpha10 contains these commits.
API পরিবর্তনগুলি
The deprecated
dataRefreshFlowanddataRefreshListenerAPIs have been removed as they are redundant with loadStateFlow / Listener updates. For those migrating, the loadStateFlow equivalent is:loadStateFlow.distinctUntilChangedBy { it.refresh } .filter { it.refresh is NotLoading }( Ib5570 , b/173530908 )
বাগ ফিক্স
- endOfPaginationReached for RemoteMediator
REFRESHnow correctly propagate to LoadState updates and prevents remoteAPPENDandPREPENDfrom triggering. ( I94a3f , b/155290248 ) - Presenting an empty list either due to empty initial page or heavy filtering will no longer prevent Paging from kicking off
PREPENDorAPPENDloads. ( I3e702 , b/168169730 ) - Fixed an issue where
getRefreshKeydoes not get called on subsequent generations of PagingSource when invalidations occur rapidly. ( I45460 , b/170027530 )
External Contribution
- A new abstract class InvalidatingPagingSourceFactory has been added with an
.invalidate()API that forwards invalidate to all of the PagingSources it emits. Thanks to @claraf3 ! ( Ie71fc , b/160716447 )
জ্ঞাত সমস্যা
- Headers and footers from the .insertSeparators() transform may not appear immediately when using RemoteMediator b/172254056
- Using RemoteMediator can cause remote
LoadStateto get stuck if invalidation andPagingSource.load(LoadParams.Refresh(...))completes beforeRemoteMediator.load()returns b/173717820
Version 3.0.0-alpha09
November 11, 2020
androidx.paging:paging-*:3.0.0-alpha09 is released. Version 3.0.0-alpha09 contains these commits.
API পরিবর্তনগুলি
- Fully deprecate dataRefreshFlow / Listener methods with a replaceWith clause. ( I6e2dd )
বাগ ফিক্স
- Fix for
IllegalArgumentExceptionbeing throw when using separators with RemoteMediator and an invalidate is triggered while a remote load that would return endOfPagination is still running ( I3a260 )
Version 3.0.0-alpha08
২৮ অক্টোবর, ২০২০
androidx.paging:paging-*:3.0.0-alpha08 is released. Version 3.0.0-alpha08 contains these commits.
API পরিবর্তনগুলি
- The Kotlin / Java variants of
DataSource.InvalidatedCallbackhave been combined by enabling SAM-conversions in Kotlin via functional interface (available in Kotlin 1.4). This also fixes a bug where the kotlin variant of invalidate callbacks were not called after transformed by.mapor.mapByPage. ( I1f244 , b/165313046 )
বাগ ফিক্স
- Paging's interaction with ViewPager has been improved considerably. Specifically, Paging will no longer cancel a
RemoteMediator#loadcall due to a page invalidation. It will also no longer make an append/prepend load request, if REFRESH is required , until REFRESH request completes successfully. ( I6390b , b/162252536 ) - API lint check for MissingGetterMatchingBuilder is enabled for androidx ( I4bbea , b/138602561 )
- Fixed a bug where
.withLoadState*ConcatAdapterhelpers would crash due to notifying RecyclerView from background thread ( I18bb5 , b/170988309 ) - Fixed a bug where loading a very small non-empty page would sometimes prevent prefetch from triggering loads correctly. Iffda3 b/169259468
Version 3.0.0-alpha07
১ অক্টোবর, ২০২০
androidx.paging:paging-*:3.0.0-alpha07 is released. Version 3.0.0-alpha07 contains these commits.
API পরিবর্তনগুলি
- Async PagingData Guava-based operators now accept an Executor as a param, to control execution context. ( Id4372 )
বাগ ফিক্স
- Fixed IndexOutOfBounds exception thrown in RemoteMediator due to a race condition. ( I00b7f , b/165821814 )
- Fixed a race condition in DataSource -> PagingSource conversion that could cause the resulting PagingSource to ignore invalidation signals from DataSource.
- Fixed an issue in page fetchin logic that would sometimes cause it to fail to pick up new generations of PagingSource until PagingDataAdapter.refresh() was invoked
- Fixed an issue that would cause scroll-position to sometimes be lost when using a DataSource converted into a PagingSource (such as the one produced by Room), in conjunction with RemoteMediator
External Contribution
- Thanks to @simonschiller for adding RxJava2, RxJava3, and Guava-based async transformation operators for PagingData!
Version 3.0.0-alpha06
September 2, 2020
androidx.paging:paging-*:3.0.0-alpha06 is released. Version 3.0.0-alpha06 contains these commits.
API পরিবর্তনগুলি
-
UnsupportedOperationExceptionwith clearer messaging around lack of support for stable ids is now thrown wheneverPagingDataAdapter.setHasStableIdsis called. ( Ib3890 , b/158801427 )
বাগ ফিক্স
- insertSeparators no longer filters out empty pages allowing prefetch distance to be respected by the presenter even in cases where many empty pages are inserted. ( I9cff6 , b/162538908 )
Version 3.0.0-alpha05
August 19, 2020
androidx.paging:paging-*:3.0.0-alpha05 is released. Version 3.0.0-alpha05 contains these commits.
বাগ ফিক্স
- Paging now correctly prefetches pages even when the presented data is heavily filtered
- Returning
LoadResult.Errorto a retried load no longer causes Item accesses to incorrectly re-trigger retry
External Contribution
- Thanks to Clara F for helping clean up some tests! ( 549612 )
Version 3.0.0-alpha04
৫ আগস্ট, ২০২০
androidx.paging:paging-*:3.0.0-alpha04 is released. Version 3.0.0-alpha04 contains these commits.
API পরিবর্তনগুলি
- Added
peek()API toAsyncPagingDataDifferandPagingDataAdapterto allow presented data access without trigger page loads. ( I38898 , b/159104197 ) - Added a
snapshot()API toPagingDataAdapterandAsyncPagingDataDifferto allow retrieving the presented items without triggering page fetch. ( I566b6 , b/159104197 ) - Added a
PagingData.from(List<T>)constructor to allow presenting static lists, which can be combined with the overall PagingData flow to show static lists in certain states, eg, before initial REFRESH finishes or simply for testing transformations. ( Id134d ) - Deprecate dataRefresh Flow / Listener APIs as they were intended to expose the presented items state on REFRESH, but with improvements to loadState Flow / Listener callback timing, and itemCount property, it is redundant ( Ia19f3 )
- Added RxJava3 compatibility wrappers for
PagingSourceandRemoteMediator( I49ef3 , b/161480176 )
বাগ ফিক্স
-
PositionalDataSourceconverted intoPagingSourceviatoPagingSourceFactoryhelper, includingPagingSourcegenerated by Room now correctly mark themselves to support jumping. ( I3e84c , b/162161201 ) - Fixed a bug where using the synchronous variant of submitData would sometimes lead to a race causing a
ClosedSendChannelException( I4d702 , b/160192222 )
External Contribution
- Thanks to Zac Sweers for adding RxJava3 compatibility wrappers on behalf of Slack! ( I49ef3 , b/161480176 )
Version 3.0.0-alpha03
জুলাই ২২, ২০২০
androidx.paging:paging-*:3.0.0-alpha03 is released. Version 3.0.0-alpha03 contains these commits.
API পরিবর্তনগুলি
- The constructor for PagingState is now public, which should make testing implementations of getRefreshKey() easier ( I8bf15 )
- Hid DataSource kotlin map function variants from Java, to resolve ambiguity between original and kotlin variants. ( If7b23 , b/161150011 )
- Redundant APIs intended as conveniences for Kotlin users have been marked @JvmSynthetic ( I56ae5 )
- Added overloads for LoadResult.Page's constructor which defaults itemsBefore and itemsAfter to COUNT_UNDEFINED ( I47849 )
- Made existing PagingData operators accept suspending methods and introduced new mapSync, flatMapSync, and filterSync non-suspending operators for Java users. The existing transformation methods have been moved to extension functions so Kotlin users will now need to import them. ( I34239 , b/159983232 )
বাগ ফিক্স
- Room (and PositionalDataSource) PagingSources will now display a leading separator as part of the first page, so the user doesn't need to scroll to reveal it. ( I6f747 , b/160257628 )
- Item accesses on placeholders now correctly trigger PagingSource loads until a page is returned that fulfills the requested index after being transformed by PagingData.filter() ( I95625 , b/158763195 )
- Fix for a bug where sometimes scrolling after PagingSource returns an error could prevent PagingDataAdapter.retry() from retrying. ( I1084f , b/160194384 )
- Fixes an issue where item accesses after dropping a page might not load pages although the item access was within prefetchDistance ( Ie95ae , b/160038730 )
- Setting PagingConfig.maxSize no longer enables placeholders after a drop event ( I2be29 , b/159667766 )
Version 3.0.0-alpha02
২৪ জুন, ২০২০
androidx.paging:paging-*:3.0.0-alpha02 is released. Version 3.0.0-alpha02 contains these commits.
API পরিবর্তনগুলি
- Added overloads for
PagingConfig's constructor with common default values ( I39c50 , b/158576040 ) - Added overloads for constructors of
PagingDataAdapterandAsyncPagingDataDifferwith common default values ( Ie91f5 ) - The adapter APIs,
dataRefreshFlowanddataRefreshListenernow pass a Boolean to signal whether aPagingDatais empty ( I6e37e , b/159054196 ) - Added RxJava and Guava APIs for RemoteMediator - RxRemoteMediator and ListenableFutureRemoteMediator
- Added helpers to PagingState for common item access such as
isEmpty()andfirstItemOrNull()( I3b5b6 , b/158892717 )
বাগ ফিক্স
- Pager now checks for PagingSource reuse in factory, to prevent accidental reuse of invalid PagingSources, which gave an unclear error ( I99809 , b/158486430 )
- Failures from RemoteMediator REFRESH no longer prevent PagingSource from loading ( I38b1b , b/158892717 )
- The non-suspending version of
submitDatano longer causes a crash due to concurrent collection on multiplePagingDatawhen called after the suspending version ofsubmitData. ( I26358 , b/158048877 ) - Fixed "cannot collect twice from pager" exception that could occur after config change ( I58bcc , b/158784811 )
Version 3.0.0-alpha01
১০ জুন, ২০২০
androidx.paging:paging-*:3.0.0-alpha01 is released. Version 3.0.0-alpha01 contains these commits.
The Paging Library has updated to 3.0, to enable several major new features.
New Features of 3.0
- First-class support for Kotlin coroutines and Flow.
- Support for async loading with coroutines suspend functions, RxJava Single or Guava ListenableFuture primitives .
- Built-in load state and error signals for responsive UI design, including retry and refresh functionality.
- Improvements to the repository layer
- Simplified data source interface
- Simplified network + database pagination
- Cancellation support
- Improvements to the presentation layer
জ্ঞাত সমস্যা
- Paging 3 javadocs are not yet available. In the interim, please use the guides linked above or the Kotlin docs. ( b/158614050 )
সংস্করণ 2.1.2
সংস্করণ 2.1.2
১৮ মার্চ, ২০২০
androidx.paging:paging:2.1.2 is released. Version 2.1.2 contains these commits against 2.1.0 .
বাগ ফিক্স
- Fix for
IndexOutOfBoundsExceptionin rare cases when converting a position during invalidation.
Release issue
Paging version
2.1.1was released incorrectly from a misconfigured branch, exposing partially-implemented APIs and functionality upcoming in a future release.Paging
2.1.2contains the load-centering fix originally released in 2.1.1, but this time correctly cherry-picked atop the 2.1.0 release. It is strongly recommended to upgrade to this release, if you are currently on 2.1.1.
সংস্করণ 2.1.1
সংস্করণ 2.1.1
১৮ ডিসেম্বর, ২০১৯
androidx.paging:paging-*:2.1.1 is released. Version 2.1.1 contains these commits .
বাগ সংশোধন
- Contiguous initial loads from PositionalDataSources are now centered around last access when placeholders disabled
সংস্করণ 2.1.0
সংস্করণ 2.1.0
January 25, 2019
Paging 2.1.0 is released with no changes from 2.1.0-rc01 .
Version 2.1.0-rc01
December 6, 2018
Paging 2.1.0-rc01 is released with no changes from 2.1.0-beta01 .
Version 2.1.0-beta01
১ নভেম্বর, ২০১৮
Paging 2.1.0-beta01 is released with no changes from 2.1.0-alpha01 .
Version 2.1.0-alpha01
October 12, 2018
Paging 2.1.0-alpha01 has two major additions - page dropping, and KTX extension libraries for every artifact - as well as several other API changes and bugfixes.
API পরিবর্তনগুলি
- Added
PagedList.Config.Builder.setMaxSize()for limiting the number of loaded items in memory. - Added
androidx.paging.Config()as a Kotlin alternative forPagedList.Config.Builder - Added
androidx.paging.PagedList()as a Kotlin alternative forPagedList.Builder - Added
DataSourceFactory.toLiveData()as a Kotlin alternative forLivePagedListBuilder - Added
DataSourceFactory.toObservable()andtoFlowable()as Kotlin alternatives forRxPagedListBuilder - Added
AsyncPagedListDiffer.addPagedListListener()for listening to when PagedList is swapped. b/111698609 - Added
PagedListAdapter.onCurrentListChanged()variant that passes old and new list, deprecated previous variant. - Added
PagedListAdapter/AsyncPagedListDiffer.submitList()variants which take an additional callback that triggers if/when the pagedlist is displayed, after diffing. This allows you to synchronize a PagedList swap with other UI updates. b/73781068 -
PagedList.getLoadedCount()added to let you know how many items are in memory. Note that the return value is always equal to.size()if placeholders are disabled.
বাগ ফিক্স
- Fixed a race condition when diffing if lists are reused b/111591017
-
PagedList.loadAround()now throwsIndexOutOfBoundsExceptionwhen index is invalid. Previously it could crash with an unclear other exception. - Fixed a case where an extremely small initial load size together with unchanged data would result in no further loading b/113122599
সংস্করণ 2.0.0
সংস্করণ 2.0.0
October 1, 2018
Paging 2.0.0 is released with a single bugfix.
বাগ ফিক্স
- Fixed a crash that could occur with very fast scrolling using
PositionalDataSourceand placeholders b/114635383 .
Version 2.0.0-beta01
২ জুলাই, ২০১৮
বাগ ফিক্স
- Fixed content disappearing in some prepend cases (placeholders disabled, PositionalDataSource) b/80149146
- (Already released in
1.0.1) Fixed crashes wherePagedListAdapterandAsyncPagedListDifferwould fail to signal move events. b/110711937
Pre-AndroidX Dependencies
For the pre-AndroidX versions of Paging that follow, include these dependencies:
dependencies {
def paging_version = "1.0.0"
implementation "android.arch.paging:runtime:$paging_version"
// alternatively - without Android dependencies for testing
testImplementation "android.arch.paging:common:$paging_version"
// optional - RxJava support
implementation "android.arch.paging:rxjava2:$paging_version"
}
সংস্করণ 1.0.1
সংস্করণ 1.0.1
June 26, 2018
Paging 1.0.1 is released with a single bugfix in runtime . We highly recommend using 1.0.1 for stability. Paging RxJava2 1.0.1 is also released, and is identical to 1.0.0-rc1 .
বাগ ফিক্স
- Fixed crashes where
PagedListAdapterandAsyncPagedListDifferwould fail to signal move events. b/110711937
RxJava2 Version 1.0.0
RxJava2 Version 1.0.0-rc1
May 16, 2018
Paging RxJava2 1.0.0-rc1 is moving to release candidate with no changes from the initial alpha.
সংস্করণ 1.0.0
Version 1.0.0-rc1
April 19, 2018 Paging Release Candidate
We do not have any more known issues or new features scheduled for the Paging 1.0.0 release. Please upgrade your projects to use 1.0.0-rc1 and help us battle test it so that we can ship a rock solid 1.0.0 .
There are no changes in this release, it is the same as 1.0.0-beta1 .
Version 1.0.0-beta1
April 5, 2018
Paging will be in beta for a short time before progressing to release candidate. We are not planning further API changes for Paging 1.0 , and the bar for any API changes is very high.
Alpha RxJava2 support for Paging is released as a separate optional module ( android.arch.paging:rxjava2:1.0.0-alpha1 ) and will temporarily be versioned separately until it stabilizes.
This new library provides an RxJava2 alternative to LivePagedListBuilder , capable of constructing Observable s and Flowable s, taking Scheduler s instead of Executor s:
কোটলিন
val pagedItems = RxPagedListBuilder(myDataSource, /* page size */ 50) .setFetchScheduler(myNetworkScheduler) .buildObservable()
জাভা
Observable<PagedList<Item>> pagedItems = RxPagedListBuilder(myDataSource, /* page size */ 50) .setFetchScheduler(myNetworkScheduler) .buildObservable();
নতুন বৈশিষ্ট্য
-
RxPagedListBuilderis added via the newandroid.arch.paging:rxjava2artifact.
API পরিবর্তনগুলি
API changes to clarify the role of executors in builders:
Renamed
setBackgroundThreadExecutor()tosetFetchExecutor()(inPagedList.BuilderandLivePagedListBuilder)Renamed
setMainThreadExecutor()tosetNotifyExecutor()(inPagedList.Builder).
Fixed
PagedList.mCallbacksmember to be private.
বাগ ফিক্স
LivePagedListBuildertriggers initialPagedListload on the specified executor, instead of the Arch Components IO thread pool.Fixed invalidate behavior in internal
DataSourcewrappers (used to implementDataSource.map, as well as placeholder-disabledPositionalDataSourceloading) b/77237534
Version 1.0.0-alpha7
March 21, 2018
Paging 1.0.0-alpha7 is released alongside Lifecycles 1.1.1 . As Paging alpha7 depends on the move of the Function class mentioned above, you will need to update your lifecycle:runtime dependency to android.arch.lifecycle:runtime:1.1.1 .
Paging alpha7 is planned to be the final release before Paging hits beta.
API পরিবর্তনগুলি
-
DataSource.LoadParamsobjects now have a public constructor andDataSource.LoadCallbackobjects are now abstract. This enables wrapping aDataSourceor directly testing aDataSourcewith a mock callback. b/72600421 - Mappers for DataSource and DataSource.Factory
-
map(Function<IN,OUT>)allows you to transform, wrap, or decorate results loaded by aDataSource. -
mapByPage(<List<IN>,List<OUT>>)enables the same for batch processing (eg if items loaded from SQL need to additionally query a separate database, that can be done as a batch.)
-
-
PagedList#getDataSource()is added as a convenience method b/72611341 - All deprecated classes have been removed from the API, including the remains of
recyclerview.extensionspackage, and theLivePagedListProvider. -
DataSource.Factoryis changed from an interface to an abstract class to enable map functionality.
বাগ ফিক্স
- Changed Builders to be final. b/70848565
- Room
DataSourceimplementation is now fixed to handle multi-table queries - this fix is contained within Room 1.1.0-beta1, see above. - Fixed a bug where
BoundaryCallback.onItemAtEndLoadedwould not be invoked forPositionalDataSourceif placeholders are enabled and the total size is an exact multiple of the page size.
Version 1.0.0-alpha5
২২ জানুয়ারী, ২০১৮
বাগ ফিক্স
- Fix page loading when placeholders are disabled b/70573345
- Additional logging for tracking down IllegalArgumentException bug b/70360195 (and speculative Room-side fix)
- Javadoc sample code fixes b/70411933 , b/71467637