পৃষ্ঠা সংখ্যা
এই সারণিতে androidx.paging গ্রুপের অন্তর্গত সমস্ত আর্টিফ্যাক্ট তালিকাভুক্ত করা হয়েছে।
| প্রত্নবস্তু | স্থিতিশীল রিলিজ | রিলিজ প্রার্থী | বিটা রিলিজ | আলফা রিলিজ |
|---|---|---|---|---|
| পৃষ্ঠা-* | ৩.৪.২ | - | - | ৩.৫.০-আলফা০১ |
| পেজিং-কম্পোজ | ৩.৪.২ | - | - | ৩.৫.০-আলফা০১ |
নির্ভরতা ঘোষণা করা
পেজিং-এর উপর নির্ভরতা যোগ করতে হলে, আপনাকে আপনার প্রজেক্টে গুগল মেভেন রিপোজিটরি যোগ করতে হবে। আরও তথ্যের জন্য গুগলের মেভেন রিপোজিটরি পড়ুন।
আপনার অ্যাপ বা মডিউলের build.gradle ফাইলে প্রয়োজনীয় আর্টিফ্যাক্টগুলোর ডিপেন্ডেন্সি যোগ করুন:
গ্রোভি
dependencies { def paging_version = "3.4.2" 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.5.0-alpha01" }
কোটলিন
dependencies { val paging_version = "3.4.2" 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.5.0-alpha01") }
কোটলিন এক্সটেনশন ব্যবহারের তথ্যের জন্য, ktx ডকুমেন্টেশন দেখুন।
নির্ভরতা সম্পর্কে আরও তথ্যের জন্য, 'বিল্ড নির্ভরতা যোগ করুন ' দেখুন।
প্রতিক্রিয়া
আপনার মতামত জেটপ্যাককে আরও উন্নত করতে সাহায্য করে। আপনি যদি নতুন কোনো সমস্যা খুঁজে পান অথবা এই লাইব্রেরিটি উন্নত করার জন্য কোনো ধারণা থাকে, তবে আমাদের জানান। নতুন কোনো সমস্যা তৈরি করার আগে অনুগ্রহ করে এই লাইব্রেরির বিদ্যমান সমস্যাগুলো দেখে নিন। আপনি তারকা বোতামে ক্লিক করে কোনো বিদ্যমান সমস্যায় আপনার ভোট যোগ করতে পারেন।
আরও তথ্যের জন্য ইস্যু ট্র্যাকার ডকুমেন্টেশন দেখুন।
সংস্করণ ৩.৫
সংস্করণ 3.5.0-alpha01
১১ মার্চ, ২০২৬
androidx.paging:paging-*:3.5.0-alpha01 প্রকাশিত হয়েছে। সংস্করণ 3.5.0-alpha01-এ এই কমিটগুলো রয়েছে।
নতুন বৈশিষ্ট্য
paging-commonআর্টিফ্যাক্টটিতে এখনFlow<PagingData>কেFlow<ItemSnapshotList>এ রূপান্তর করার জন্য একটি নতুনasStateফ্লো অপারেটর রয়েছে। এর ফলে নিম্নলিখিত ক্ষমতাগুলো উন্মোচিত হয়:-
ItemSnapshotListএর প্রবাহকে অন্যান্য ডেটা উৎসের সাথে একত্রিত করুন -
cachedInছাড়া একাধিক কালেক্টরের সাথে ফ্লো শেয়ার করুন - পেজড ডেটা স্থানীয়ভাবে ক্যাশ করুন
- মেমরিতে পেজড ডেটা পরিবর্তন করুন
- UI স্টেটের অংশ হিসেবে পেজ করা ডেটা প্রকাশ করুন
// In your ViewModel val pager = Pager(pagingConfig, pagingSourceFactory) val pagerFlow = pager.flow.asState() // alterantively convert the flow to a SharedFlow val pagerFlow = pager.flow.asState().stateIn() // In presenter layer val snapshotFlow = viewModel.pagerFlow.collectAsStateWithLifecycle(initialList) val snapshot = itemsFlow.value LazyColumn { items(items = snapshot.items) { ... } }-
paging-commonআর্টিফ্যাক্টটিতেPager.appendএবংPager.prependএপিআই-ও যুক্ত করা হয়েছে, যার মাধ্যমে লোড হওয়া আইটেমগুলোর যেকোনো প্রান্তে ম্যানুয়ালি লোড ট্রিগার করা যায়।-
paging-runtimeবাpaging-composeসাথে ব্যবহার করা হলে, এটি স্ক্রলিং ছাড়াও আরও ডেটা লোড করার একটি বিকল্প প্রদান করে। - নতুন
asStateAPI-এর সাথে ব্যবহার করা হলে, আরও ডেটা লোড করার এটিই একমাত্র উপায়।
LazyColumn { item { /** * Load more items when users scroll near the top of loaded items. */ LaunchedEffect(viewModel) { viewModel.prepend() } } items(snapshot.items) { item -> Text("Item: $item") } item { /** * Load more items when users scroll near the bottom of loaded items. */ LaunchedEffect(viewModel) { viewModel.append() } } }-
asStateAPI ব্যবহার করার সময় লোড ত্রুটি থেকে পুনরুদ্ধার করার জন্যPager.refreshএবংPager.retryযোগ করা হয়েছে। নতুন API-গুলির আরও নমুনা ব্যবহারের জন্য এই ডকুমেন্টটি দেখুন। ( I1e1e9 , If3c87 , Idbd48 , Id1e1d , I816fe )
সংস্করণ ৩.৪
সংস্করণ ৩.৪.২
১১ মার্চ, ২০২৬
androidx.paging:paging-*:3.4.2 প্রকাশিত হয়েছে। সংস্করণ 3.4.2-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
কোন পরিবর্তন নেই
- এই রিলিজে ভার্সন ৩.৪.১ থেকে কোনো এপিআই বা আচরণগত পরিবর্তন নেই।
সংস্করণ ৩.৪.১
১১ ফেব্রুয়ারী, ২০২৬
androidx.paging:paging-*:3.4.1 প্রকাশিত হয়েছে। সংস্করণ 3.4.1-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
নির্ভরতা আপডেট
- paging-guava-এর guava নির্ভরতা সংস্করণ 31.1 থেকে 32.0.1-এ আপডেট করা হয়েছে।
সংস্করণ ৩.৪.০
২৮ জানুয়ারী, ২০২৬
androidx.paging:paging-*:3.4.0 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
3.3.0 সংস্করণের পর থেকে গুরুত্বপূর্ণ পরিবর্তনসমূহ:
-
paging-common,paging-testing, এবংpaging-composeএ আরও KMP টার্গেট যোগ করা হয়েছে। সব মিলিয়ে, এগুলি এখন JVM (অ্যান্ড্রয়েড এবং ডেস্কটপ), নেটিভ (লিনাক্স, iOS, watchOS, tvOS, macOS, MinGW), এবং ওয়েব (জাভাস্ক্রিপ্ট, WasmJS) সমর্থন করে। - Jetbrains-এর macosX64 টার্গেটগুলোর অবলুপ্তির সাথে সামঞ্জস্য রেখে
paging-common,paging-testing, এবংpaging-composemacosX64,iosX64,watchosX64, এবংtvosX64এর জন্য সমর্থন সরিয়ে নেওয়া হয়েছে। - টার্গেট পজিশনের সবচেয়ে কাছের এবং ইনপুট প্রেডিকেটের সাথে মেলে এমন লোড হওয়া আইটেমটি পুনরুদ্ধার করার জন্য
closestItemAroundPositionনামে একটি নতুনPagingStateAPI যোগ করা হয়েছে। এটি আইটেম-ভিত্তিক রিফ্রেশ কী তৈরি করতে ব্যবহার করা যেতে পারে, যেখানে আদর্শ অ্যাঙ্করযোগ্য আইটেমটি আশেপাশে থাকে কিন্তু ঠিক টার্গেট পজিশনে থাকে না।
সংস্করণ 3.4.0-rc01
১৪ জানুয়ারী, ২০২৬
androidx.paging:paging-*:3.4.0-rc01 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-rc01-এ এই কমিটগুলো রয়েছে।
নতুন বৈশিষ্ট্য
- Jetbrains-এর macosX64 টার্গেটগুলো অপ্রচলিত করার সিদ্ধান্তের সাথে সামঞ্জস্য রেখে নিম্নলিখিত KMP প্ল্যাটফর্মগুলোর জন্য সমর্থন সরানো হয়েছে:
macosX64,iosX64,watchosX64, এবংtvosX64। ( 7cb9a4 )
সংস্করণ 3.4.0-beta01
১৭ ডিসেম্বর, ২০২৫
androidx.paging:paging-*:3.4.0-beta01 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-beta01-এ এই কমিটগুলো রয়েছে।
বাগ সংশোধন
-
RecyclerViewএবংRefreshলোডের মধ্যেকার রেস কন্ডিশনের সমাধান করা হয়েছে, যার ফলেRecyclerViewতেIndexOutOfBoundsExceptionদেখা দিত। ক্রমাগতRefreshলোডের কারণে UI আপডেট বাধাগ্রস্ত হলে Paging স্টেট এবংRecyclerViewএর মধ্যে অসামঞ্জস্য দেখা দিতে পারে। যদি কোনো Refresh লোড বাধাগ্রস্ত হয় (যেমন, পরপরRefreshলোডের কারণে), তাহলে Paging-কে তার Refresh-পূর্ববর্তী অবস্থায় রিসেট করার মাধ্যমে এর সমাধান করা হয়েছে। ( I771b0 , b/409809768 )
সংস্করণ 3.4.0-alpha04
১০ সেপ্টেম্বর, ২০২৫
androidx.paging:paging-*:3.4.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-alpha04-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
- টার্গেট পজিশনের সবচেয়ে কাছের এবং ইনপুট প্রেডিকেটের সাথে মেলে এমন লোড করা আইটেমটি পুনরুদ্ধার করার জন্য
closestItemAroundPositionনামে একটি নতুনPagingStateAPI যোগ করা হয়েছে। এটি আইটেম-ভিত্তিক রিফ্রেশ কী তৈরি করতে ব্যবহার করা যেতে পারে, যেখানে আদর্শ অ্যাঙ্করযোগ্য আইটেমটি টার্গেট পজিশনের আশেপাশে থাকে কিন্তু ঠিক সেই পজিশনে থাকে না। ( I96e5c , b/440187139 )
সংস্করণ 3.4.0-alpha03
২৭ আগস্ট, ২০২৫
androidx.paging:paging-*:3.4.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.4.0-alpha03-এ এই কমিটগুলো রয়েছে।
নতুন বৈশিষ্ট্য
- পেজিং-কমন ডেস্কটপকে একটি নতুন কোটলিন মাল্টিপ্ল্যাটফর্ম (কেএমপি) টার্গেট হিসেবে যুক্ত করেছে। সব মিলিয়ে এটি এখন জেভিএম (অ্যান্ড্রয়েড এবং ডেস্কটপ), নেটিভ (লিনাক্স, আইওএস, ওয়াচওএস, টিভিওএস, ম্যাকওএস, মিনজিডব্লিউ), এবং ওয়েব (জাভাস্ক্রিপ্ট, ওয়াসমজেএস) সমর্থন করে। ( আইডি২৪৮৩ , বি/৪৩৬৮৮৪৮১১ )
- পেজিং-টেস্টিং নতুন কোটলিন মাল্টিপ্ল্যাটফর্ম (কেএমপি) টার্গেট যুক্ত করেছে। সব মিলিয়ে এটি এখন জেভিএম (অ্যান্ড্রয়েড এবং ডেস্কটপ), নেটিভ (লিনাক্স, আইওএস, ওয়াচওএস, টিভিওএস, ম্যাকওএস, মিনজিডব্লিউ), এবং ওয়েব (জাভাস্ক্রিপ্ট, ওয়াসমজেএস) সমর্থন করে। ( I0c543 , b/435014650 )
- পেজিং-কম্পোজ নতুন কোটলিন মাল্টিপ্ল্যাটফর্ম (কেএমপি) টার্গেট যুক্ত করেছে। সব মিলিয়ে এটি এখন জেভিএম (অ্যান্ড্রয়েড এবং ডেস্কটপ), নেটিভ (লিনাক্স, আইওএস, ওয়াচওএস, টিভিওএস, ম্যাকওএস, মিনজিডব্লিউ), এবং ওয়েব (জাভাস্ক্রিপ্ট, ওয়াসমজেএস) সমর্থন করে। ( I70d44 , b/436884801 )
এপিআই পরিবর্তন
- ডিফল্ট 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-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
-
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আপডেট করার সময় ব্যবহারকারী স্ক্রোল করলে যে বাগটিIndexOutOfBoundsExceptionথ্রো করতRecyclerViewতা সমাধান করা হয়েছে ( Id1f16 , b/381024738 ) - স্ক্রোল করার সময় রিফ্রেশ করলে পেজিং আরও লোড ট্রিগার করতে না পারার বাগটি সংশোধন করা হয়েছে। ( I60ca5 , b/352586078 )
- পেজিং আইটেম রিফ্রেশ করার সময় স্ক্রোল করতে গিয়ে যে ক্র্যাশ হতো, তা ঠিক করা হয়েছে। ( I8c65a , b/347649763 )
সংস্করণ ৩.৩
সংস্করণ 3.3.6
১২ ফেব্রুয়ারী, ২০২৫
androidx.paging:paging-*:3.3.6 প্রকাশিত হয়েছে। সংস্করণ 3.3.6-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
- প্রাথমিক রিফ্রেশের সময় পাঠানো রিফ্রেশ এবং রিট্রাই সিগন্যালগুলো এখন থেকে সংরক্ষিত থাকবে এবং পেজিং প্রেজেন্টার প্রস্তুত হয়ে গেলেই স্বয়ংক্রিয়ভাবে পুনরায় পাঠানো হবে।
বাহ্যিক অবদান
সংস্করণ ৩.৩.৫
১১ ডিসেম্বর, ২০২৪
androidx.paging:paging-*:3.3.5 প্রকাশিত হয়েছে। সংস্করণ 3.3.5-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
-
RecyclerViewআপডেট করার সময় ব্যবহারকারী স্ক্রোল করলে যে বাগটি দেখা দিতোRecyclerViewIndexOutOfBoundsExceptionসমাধান করা হয়েছে। ( Id1f16 , b/381024738 )
সংস্করণ ৩.৩.৪
১৩ নভেম্বর, ২০২৪
androidx.paging:paging-*:3.3.4 প্রকাশিত হয়েছে। সংস্করণ 3.3.4-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
- পেজিং ৩.৩ বা তার পরবর্তী সংস্করণ ব্যবহার করা অ্যান্ড্রয়েড ইউনিট টেস্টগুলো এখন আর
Method isLoggable in android.util.Log not mockedএর মতো ত্রুটি দেখাবে না। ( Ia9400 , b/331684448 )
সংস্করণ ৩.৩.২
৭ আগস্ট, ২০২৪
androidx.paging:paging-*:3.3.2 প্রকাশিত হয়েছে। সংস্করণ 3.3.2-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
নতুন বৈশিষ্ট্য
-
paging-commonএবংpaging-testingনতুন Kotlin-Multiplatform টার্গেট যোগ করেছে:watchos,tvos, এবংlinuxArm64( 90c9768 ), ( 53e0eca )
সংস্করণ ৩.৩.১
২৪ জুলাই, ২০২৪
androidx.paging:paging-*:3.3.1 প্রকাশিত হয়েছে। সংস্করণ 3.3.1-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
- একটি সমস্যার সমাধান করা হয়েছে যেখানে স্ক্রোল করার সময় ব্যাকএন্ড ডেটা সোর্স রিফ্রেশ হলে
AsyncPagingDataDifferঅথবা এর উপর ভিত্তি করে তৈরি API, যেমনRecyclerViewএর সাথে ব্যবহৃতPagingDataAdapterনতুন করে ডেটা লোড করতে পারতো না। ( I60ca5 , b/352586078 ) -
PagingDataAdapterবাAsyncPagingDataDifferব্যবহার করেRecyclerViewস্ক্রোল করার সময় ব্যাকএন্ড ডেটা সোর্স থেকে আইটেম সরানো হলে যে ক্র্যাশটি ঘটত, তা সমাধান করা হয়েছে। ( I8c65a , b/347649763 )
সংস্করণ ৩.৩.০
১৪ মে, ২০২৪
androidx.paging:paging-*:3.3.0 প্রকাশিত হয়েছে। সংস্করণ 3.3.0-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
3.2.0 থেকে গুরুত্বপূর্ণ পরিবর্তনসমূহ
-
PagingDataPresenterএখন একটি পাবলিক ক্লাস। এখন থেকে অভ্যন্তরীণ পেজিং এপিআই অথবাpaging-runtime-এরAsyncPagingDataDifferএর পরিবর্তেPagingDataPresenterএর উপর ভিত্তি করে মাল্টিপ্ল্যাটফর্ম প্রেজেন্টার তৈরি করা যাবে। -
hasErrorএবংisIdleএ নতুনLoadStatesএবংCombinedLoadStatesহেল্পার মেথড যোগ করা হয়েছে, যা যথাক্রমেLoadStates`Error` বাNotLoadingস্টেটে আছে কিনা তা পরীক্ষা করে। এছাড়াওFlow<CombinedLoadStates>-এ একটি নতুনawaitNotLoading()` কোটলিন এক্সটেনশন মেথড যোগ করা হয়েছে, যা একটি লোডNotLoadingবা `Error` স্টেটে স্থির না হওয়া পর্যন্ত অপেক্ষা করে। -
PagingData.empty()এখন ডিফল্টরূপেNotLoadingস্টেট ডিসপ্যাচ করে, যদি না এর কনস্ট্রাক্টরে কাস্টমLoadStatesপাস করা হয়। এটি বিদ্যমান আচরণ থেকে ভিন্ন, যেখানে এটিPagingDataAdapterএ সাবমিট করার সময়LoadStatesডিসপ্যাচ করত না অথবাLazyPagingItemsহিসেবে সংগ্রহ করার সময় Loading স্টেট ডিসপ্যাচ করত।LazyPagingItemsহিসেবে সংগ্রহ করা হলে, এটি এখন প্রাথমিক কম্পোজিশনের সাথে সাথেই একটি খালি তালিকাও প্রদর্শন করবে।
কোটলিন মাল্টিপ্ল্যাটফর্ম সামঞ্জস্যতা
মূলত CashApp-এর মাল্টিপ্ল্যাটফর্ম-পেজিং প্রজেক্ট থেকে আপস্ট্রিম করা কাজের কল্যাণে, পেজিং এখন কোটলিন মাল্টিপ্ল্যাটফর্মের সাথে সামঞ্জস্যপূর্ণ আর্টিফ্যাক্ট সরবরাহ করে।
-
paging-commonসমস্ত Paging 3 API-কেcommonএর অন্তর্ভুক্ত করেছে এবং এখন এটি Android-এর পাশাপাশি jvm ও iOS-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-testingতার কোডcommon-এ স্থানান্তর করেছে এবং এখন এটি অ্যান্ড্রয়েডের পাশাপাশি জেভিএম ও আইওএস-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-composeতার কোডcommonএ স্থানান্তর করেছে এবং একটি অ্যান্ড্রয়েড আর্টিফ্যাক্ট সরবরাহ করে, যাandroidx.composeএর মাল্টিপ্ল্যাটফর্ম সমর্থনের সাথে সামঞ্জস্যপূর্ণ। -
paging-runtime,paging-guava,paging-rxjava2এবংpaging-rxjava3শুধুমাত্র অ্যান্ড্রয়েডের জন্যই থাকবে।
সংস্করণ 3.3.0-rc01
১ মে, ২০২৪
androidx.paging:paging-*:3.3.0-rc01 Paging 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-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
- পেজিং এখন সাধারণ কোডের জন্য AndroidX Annotation-এর
@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 APIs) অথবাpaging-runtime)-এরAsyncPagingDataDifferএর পরিবর্তেPagingDataPresenterএর উপর ভিত্তি করে মাল্টিপ্ল্যাটফর্ম প্রেজেন্টার তৈরি করা যাবে। ( Id1f74 , b/315214786 ) -
LoadStatesঅবস্থা Error বা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সমস্ত Paging 3 API-কেcommonএর অন্তর্ভুক্ত করেছে এবং এখন এটি Android-এর পাশাপাশি jvm ও iOS-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-testingতার কোডcommon-এ স্থানান্তর করেছে এবং এখন এটি অ্যান্ড্রয়েডের পাশাপাশি জেভিএম ও আইওএস-এর সাথেও সামঞ্জস্যপূর্ণ। -
paging-composeতার কোডcommonএ স্থানান্তর করেছে এবং একটি অ্যান্ড্রয়েড আর্টিফ্যাক্ট সরবরাহ করে, যাandroidx.composeএর মাল্টিপ্ল্যাটফর্ম সমর্থনের সাথে সামঞ্জস্যপূর্ণ। -
paging-runtime,paging-guava,paging-rxjava2এবংpaging-rxjava3শুধুমাত্র অ্যান্ড্রয়েডের জন্যই থাকবে।
এপিআই পরিবর্তন
- পাবলিক লগার ইন্টারফেস, যা শুধুমাত্র অভ্যন্তরীণ ব্যবহারের জন্য তৈরি করা হয়েছিল, তা বাতিল করা হয়েছে ( 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ব্যবহার করুন।
সংস্করণ ৩.২
সংস্করণ ৩.২.১
৬ সেপ্টেম্বর, ২০২৩
androidx.paging:paging-*:3.2.1 প্রকাশিত হয়েছে। সংস্করণ 3.2.1-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
- একটি সমস্যার সমাধান করা হয়েছে যেখানে
PagingData.from(List)ব্যবহার করে তৈরি করা একটি Flow পাস করা হলে Paging Testing আর্টিফ্যাক্টেরasSnapshot()API-টি হ্যাং হয়ে যেত, কারণasSnapshot()এর কাছে লোডিং কখন শেষ হয়েছে সে সম্পর্কে কোনো তথ্য থাকত না (PagingData.from(List, LoadStates)ওভারলোডের মতো নয়)। এই বিকল্প সমাধানটি শুধুমাত্র কমপ্লিটেবল Flow-এর জন্য কাজ করে (যেমন, একটিflowOf(PagingData.from(...)))। নন-কমপ্লিটেবল Flow-এর জন্য (যেমন,MutableStateFlow),PagingData.fromওভারলোডটি ব্যবহার করুন যাLoadStatesপ্রদান করে। ( I502c3 ) - পেজিং কম্পোজ এখন অভ্যন্তরীণভাবে
AndroidUiDispatcher.Mainব্যবহার করে, যাতে লোডিং সম্পন্ন হওয়ার সাথে সাথেই নতুন ডেটা একই ফ্রেমে উপলব্ধ হয়। ( Ia55af )
সংস্করণ ৩.২.০
২৬ জুলাই, ২০২৩
androidx.paging:paging-*:3.2.0 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
3.1.0 থেকে গুরুত্বপূর্ণ পরিবর্তনসমূহ
- পেজিং কম্পোজ এপিআই স্থিতিশীলতা অর্জন করেছে এবং এটিকে পেজিং-এর বাকি অংশের সাথে পুনরায় একীভূত করা হয়েছে, যেখানে এর সংস্করণটি এখন পেজিং-এর অন্যান্য সমস্ত আর্টিফ্যাক্টের সাথে মিলে যায়। ৩.১.০ সংস্করণের পর থেকে পরিবর্তনগুলোর মধ্যে রয়েছে:
-
PagingData.from(fakeData)তৈরি করে এবং সেইPagingDataএকটিMutableStateFlowমধ্যে র্যাপ করে (যেমনMutableStateFlow(PagingData.from(listOf(1, 2, 3)))) নকল ডেটার একটি তালিকা প্রিভিউ করার জন্য সাপোর্ট দেওয়া হয়েছে। প্রিভিউ করার জন্য এই ফ্লো-টিকে@Previewকম্পোজেবল-এর মধ্যেcollectAsLazyPagingItems()এর রিসিভার হিসেবে পাস করুন। -
LazyVerticalGridএবংHorizontalPagerমতো সমস্ত লেজি লেআউটের পাশাপাশি Wear এবং TV লাইব্রেরির কাস্টম লেজি কম্পোনেন্টগুলোর জন্য সমর্থন। এটি নতুন নিম্ন-স্তরেরLazyPagingItemsএক্সটেনশন মেথডitemKeyএবংitemContentTypeএর মাধ্যমে অর্জন করা হয়েছে, যা আপনাকেLazyColumn,LazyVerticalGridএর জন্য আগে থেকেই বিদ্যমান স্ট্যান্ডার্ডitemsএপিআই-গুলোতে এবংHorizontalPagerমতো এপিআই-গুলোতে তাদের সমতুল্য প্যারামিটারগুলোতেkeyএবংcontentTypeপ্রয়োগ করতে সাহায্য করে। -
items(lazyPagingItems)এবংitemsIndexed(lazyPagingItems), যেগুলো শুধুমাত্রLazyListScopeসমর্থন করত, সেগুলোকে অপ্রচলিত ঘোষণা করা হয়েছে।
-
- নতুন
paging-testingআর্টিফ্যাক্ট যা আপনার অ্যাপের প্রতিটি লেয়ার এবং পেজিং-এর সাথে এর ইন্টিগ্রেশনকে বিচ্ছিন্নভাবে ইউনিট টেস্টিং করার জন্য ডিজাইন করা এপিআই প্রদান করে। উদাহরণস্বরূপ, এতে অন্তর্ভুক্ত রয়েছে-
TestPagerক্লাস যা আপনাকে পেজার এবং আসল UI থেকে স্বাধীনভাবে আপনার নিজস্ব কাস্টমPagingSourceইমপ্লিমেন্টেশনের আচরণ যাচাই করার সুযোগ দেয়। - একটি
Flow<List<Value>>অথবা একটি স্ট্যাটিকList<Value>কে এমন একটিPagingSourceFactoryতে রূপান্তর করার জন্যasPagingSourceFactoryAPI, যা টেস্টের সময় একটি Pager-এ পাঠানো যায়। -
Flow<PagingData<Value>>এর উপরasSnapshotএকটি কোটলিন এক্সটেনশন, যা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ফাংশনাল ইন্টারফেস যোগ করা হয়েছে, যা পূর্ববর্তী () ->PagingSourceল্যাম্বডাগুলোর চেয়ে আরও সুস্পষ্ট API সারফেস প্রদান করে। এই ফ্যাক্টরিটি একটি Pager ইনস্ট্যানশিয়েট করতে ব্যবহার করা যেতে পারে।
সংস্করণ 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-এ এই কমিটগুলো রয়েছে।
পেজিং কম্পোজ
- পেজিং কম্পোজ আনুষ্ঠানিকভাবে এপিআই স্থিতিশীলতা অর্জন করেছে। সেই অনুযায়ী, এর সংস্করণটি
1.0.0-alpha20থেকে আপডেট করা হয়েছে, যা এখন অন্যান্য সকল পেজিং আর্টিফ্যাক্টের সংস্করণের সাথে মিলে যায়।
এপিআই পরিবর্তন
- Paging Compose থেকে অপ্রচলিত
items(LazyPagingItems)এবংitemsIndexed(LazyPagingItems)API-গুলো সরিয়ে ফেলা হয়েছে। এদের প্রতিস্থাপিত API-গুলোর উদাহরণের জন্য Paging Compose1.0.0-alpha20রিলিজ নোট দেখুন। ( I9626e )
সংস্করণ 3.2.0-alpha06
২৪ মে, ২০২৩
androidx.paging:paging-*:3.2.0-alpha06 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha06-এ এই কমিটগুলো রয়েছে।
নতুন বৈশিষ্ট্য
- একটি নতুন
PagingSourceFactoryফাংশনাল ইন্টারফেস যোগ করা হয়েছে যা বিদ্যমান() -> PagingSourceল্যাম্বডাগুলোর চেয়ে আরও সুস্পষ্ট API সারফেস প্রদান করে। এই ফ্যাক্টরিটি একটিPagerইনস্ট্যানশিয়েট করতে ব্যবহার করা যেতে পারে। ( I33165 , b/280655188 ) -
List<Value>.asPagingSourceFactory()এর নতুনpaging-testingAPI যোগ করা হয়েছে, যা এমন একটিPagingSourceFactoryপ্রদান করে যা শুধুমাত্র ডেটার একটি অপরিবর্তনীয় তালিকা থেকে লোড হয়। স্ট্যাটিক ডেটার একাধিক জেনারেশন দিয়ে পরীক্ষার জন্যFlow<List<Value>>এর বিদ্যমান এক্সটেনশনটি এখনও ব্যবহার করা উচিত। ( Id34d1 , b/280655188 )
এপিআই পরিবর্তন
- পেজিং-টেস্টিং-এর সমস্ত পাবলিক এপিআই এখন
@VisibleForTestingদিয়ে টীকাযুক্ত করা হয়েছে, যাতে এই এপিআইগুলো শুধুমাত্র টেস্টেই ব্যবহৃত হয়। ( I7db6e ) -
asSnapshotAPI-তে এখন আরCoroutineScopeপাস করার প্রয়োজন নেই। এটি এখন ডিফল্টরূপে এর প্যারেন্ট স্কোপ থেকে উত্তরাধিকারসূত্রে প্রাপ্ত কনটেক্সট ব্যবহার করে। ( Id0a78 , b/282240990 ) - বাস্তব
Pagerকনস্ট্রাক্টর প্যারামিটারগুলোর ক্রমের সাথে স্বজ্ঞাগতভাবে মেলানোর জন্যTestPagerকনস্ট্রাক্টর প্যারামিটারগুলোর ক্রম পুনর্বিন্যাস করা হয়েছে ( I6185a ) - পেজিং-টেস্টিং-এর ল্যাম্বডা টাইপ
() -> PagingSource<Key, Value>এর ব্যবহারকেPagingSourceFactory<Key, Value>টাইপে স্থানান্তরিত করা হয়েছে। ( I4a950 , b/280655188 )
আচরণগত পরিবর্তন
-
asSnapshotPaging টেস্টগুলো চালানোর জন্য এখন আর প্রধান ডিসপ্যাচারের প্রয়োজন নেই। এটি সেট করলে টেস্টের আচরণে এখন আর কোনো পরিবর্তন হয় না। ( Ie56ea )
সংস্করণ 3.2.0-alpha05
৩ মে, ২০২৩
androidx.paging:paging-*:3.2.0-alpha05 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha05-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
-
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তৈরি করে। ফ্লো থেকে নির্গত প্রতিটিList<Value>>পেজড ডেটার একটি জেনারেশনকে প্রতিনিধিত্ব করে। এটি পেজারের ডেটা সংগ্রহের জন্য একটি নকল ডেটা সোর্স তৈরি করে, যার মাধ্যমে, উদাহরণস্বরূপ,PagingDataট্রান্সফরমেশনের উপর পেজিং টেস্ট সহজতর হয়। ( I6f230 , b/235528239 ) একটি
Flow<PagingData<T>>এর অন্তর্ভুক্ত ডেটা সঠিক কিনা তা যাচাই করার জন্য উপযুক্ত নতুন API-সহpaging-testingআর্টিফ্যাক্টটি সম্প্রসারিত করা হয়েছে। উদাহরণস্বরূপ, আপনার ViewModel লেয়ার থেকে একটিFlow<PagingData<T>>এর আউটপুট অ্যাসার্ট করতে এটি ব্যবহার করা যেতে পারে।এটি
Flow<PagingData<Value>>এরasSnapshotKotlin এক্সটেনশনের মাধ্যমে করা হয়, যাFlow<PagingData<Value>>কে একটি সরাসরিList<Value>তে রূপান্তরিত করে।asSnapshotল্যাম্বডা আপনাকে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 )
এপিআই পরিবর্তন
-
AsyncPagingDataDifferএবংPagingDataAdapterএgetItemএবংpeekএর UI কলগুলোকে এখন সঠিকভাবে শুধুমাত্র Main থ্রেডে কলযোগ্য হিসেবে চিহ্নিত করা হয়েছে। ( I699b6 ) -
TestPagerদ্বারা ব্যবহৃত জেনেরিক টাইপগুলো থেকে ওয়াইল্ডকার্ড সরানো হয়েছে, যার ফলে জাভা প্রোগ্রামিং ভাষায় লেখা কোডে ঐ মেথডগুলোর ফলাফল ব্যবহার করা আরও সহজ হয়েছে। ( I56c42 )
সংস্করণ 3.2.0-alpha03
২৪ অক্টোবর, ২০২২
androidx.paging:paging-*:3.2.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha03-এ এই কমিটগুলো রয়েছে।
পেজিং টেস্টিং
এই রিলিজে একটি নতুন আর্টিফ্যাক্ট রয়েছে: paging-testing । এই আর্টিফ্যাক্টটি আপনার অ্যাপের প্রতিটি লেয়ার এবং পেজিং-এর সাথে এর ইন্টিগ্রেশনকে বিচ্ছিন্নভাবে ইউনিট টেস্টিং করার জন্য ডিজাইন করা এপিআই সরবরাহ করে।
উদাহরণস্বরূপ, এই প্রথম রিলিজে একটি TestPager ক্লাস অন্তর্ভুক্ত রয়েছে, যা আপনাকে Pager এবং আসল UI থেকে স্বাধীনভাবে আপনার নিজস্ব কাস্টম PagingSource ইমপ্লিমেন্টেশনের আচরণ যাচাই করার সুযোগ দেয়, যা সাধারণত এন্ড-টু-এন্ড পেজিং ইন্টিগ্রেশন সিমুলেট করার জন্য আপনার প্রয়োজন হয়।
TestPager একটি নকল (fake) হিসেবে বিবেচনা করা উচিত – এটি একটি টেস্ট ডাবল যা Pager এর আসল বাস্তবায়নের প্রতিচ্ছবি হিসেবে কাজ করে এবং একই সাথে একটি PagingSource পরীক্ষা করার জন্য একটি সরলীকৃত API সারফেস প্রদান করে। এই API-গুলো suspend ) API এবং অ্যান্ড্রয়েডে কোটলিন কো-রুটিন পরীক্ষা করার নির্দেশিকায় বর্ণিত পদ্ধতি অনুযায়ী এগুলো runTest মধ্যে চালানো উচিত।
এই API-গুলোর ব্যবহারের একটি উদাহরণ room-paging টেস্টগুলোতে পাওয়া যায়, যেগুলোকে TestPager ব্যবহার করার জন্য রিফ্যাক্টর করা হয়েছিল।
এপিআই পরিবর্তন
-
LoadResult.Page.iterator()এর মাধ্যমেLoadResult.Page.dataউপর সুবিধাজনক পুনরাবৃত্তি সক্ষম করে। এটি পরোক্ষভাবে কোটলিন স্ট্যান্ডার্ড লাইব্রেরিরflattenপদ্ধতি ব্যবহারের সুযোগ দেয়, যখন একটিList<LoadResult.Page>দেওয়া হয়, যেমনPagingSource.getRefreshKeyপদ্ধতিতেPagingStateএরpagesপ্রপার্টি পাস করার ক্ষেত্রে। ( Ie0718 )
সংস্করণ 3.2.0-alpha02
১০ আগস্ট, ২০২২
androidx.paging:paging-*:3.2.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 3.2.0-alpha02-এ এই কমিটগুলো রয়েছে।
নতুন বৈশিষ্ট্য
- পেজিং এখন
PagingDataথেকে সংগৃহীত ডিবাগিং তথ্য প্রকাশ করার জন্যAsyncPagingDataDifferবাPagingDataAdapterক্লাসের মাধ্যমে লগ প্রদান করে। -
adb shell setprop log.tag.Paging [DEBUG|VERBOSE].এইadb shellকমান্ডের মাধ্যমে লগগুলি সক্রিয় করা যেতে পারে। ( 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-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
-
PagingDataAdapterএবংAsyncPagingDataDifferজন্য এমন কনস্ট্রাক্টর যোগ করা হয়েছে যাCoroutineDispatcherপরিবর্তেCoroutineContextগ্রহণ করে। ( Idc878 ) - ডিফল্টরূপে,
PagingData.from()এবংPagingData.empty()প্রেজেন্টার সাইডেরCombinedLoadStatesপ্রভাবিত করবে না। একটি নতুন ওভারলোড যোগ করা হয়েছে যা এই কনস্ট্রাক্টরগুলিতেsourceLoadStatesএবংremoteLoadStatesপাস করার সুযোগ দেয়। এর ফলেLoadStatesসম্পূর্ণরূপে টার্মিনাল (অর্থাৎ,NotLoading(endOfPaginationReached = false)) হিসেবে সেট করার বিদ্যমান আচরণটি বজায় থাকবে, এবং প্রয়োজনে রিমোট স্টেটগুলোও অন্তর্ভুক্ত করার বিকল্প থাকবে। যদিLoadStatesপাস করা না হয়, তাহলে প্রেজেন্টার সাইড যখন স্ট্যাটিকPagingDataগ্রহণ করবে, তখন পূর্ববর্তীCombinedLoadStatesবজায় থাকবে। ( Ic3ce5 , b/205344028 )
বাগ সংশোধন
- যেসব ক্ষেত্রে একটি নন-নাল
initialKeyসেট করা ছিল, কিন্তুPagingSource.getRefreshKey()` নাল রিটার্ন করত, সেসব ক্ষেত্রে এর ফলাফলকে এখনinitialKeyচেয়ে সঠিকভাবে অগ্রাধিকার দেওয়া হয়। ( Ic9542 , b/230391606 )
বাহ্যিক অবদান
- test-coroutines-lib মাইগ্রেশনের কারণে :compose:ui:ui-test api (updateApi) আপডেট করা হয়েছে ( I3366d )
সংস্করণ ৩.১
সংস্করণ ৩.১.১
৯ মার্চ, ২০২২
androidx.paging:paging-*:3.1.1 প্রকাশিত হয়েছে। সংস্করণ 3.1.1-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
-
.cachedIn()দ্বারা ভুলভাবে যুক্ত হওয়া, জেনারেশনগুলোর মধ্যবর্তীLoadState.NotLoadingইভেন্টগুলো সরিয়ে ফেলা হয়েছে। এই পরিবর্তনের ফলেLoadStateপরিবর্তনের উপর প্রতিক্রিয়া জানানো অনেক সহজ হয়েছে, কারণ এটি ব্যর্থ লোড পুনরায় চেষ্টা করার সময়, রিফ্রেশ করার সময় বা ইনভ্যালিডেশনের সময় তৈরি হওয়া অপ্রয়োজনীয়LoadState.NotLoadingইভেন্টগুলো অপসারণ করে।
সংস্করণ ৩.১.০
১৭ নভেম্বর, ২০২১
androidx.paging:paging-*:3.1.0 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
3.0.0 থেকে গুরুত্বপূর্ণ পরিবর্তনসমূহ
-
Flow<PagingData>.observableএবংFlow<PagingData>.flowableAPI-গুলো এখন আর পরীক্ষামূলক নয়। -
LoadStateএর আচরণগত পরিবর্তন:-
PagingSourceএবংRemoteMediatorউভয়ের ক্ষেত্রেইLoadType.REFRESHজন্যendOfPaginationReachedএখন সর্বদাfalse - পেজিং থেকে
LoadStatesএখন ডাউনস্ট্রিমে পাঠানোর আগেPagingSourceএবংRemoteMediatorউভয়ের কাছ থেকে বৈধ মানের জন্য অপেক্ষা করবে।PagingDataনতুন জেনারেশনগুলো এখন থেকে রিফ্রেশ স্টেটের জন্য সর্বদা সঠিকভাবেLoadingদিয়ে শুরু হবে, যা আগে কিছু ক্ষেত্রে ভুলভাবেNotLoading-এ রিসেট হয়ে যেত। - প্রেজেন্টার এপিআই-এর
.loadStateFlowএবং.addLoadStateListenerএখন আর অপ্রয়োজনীয়ভাবে এমন একটি প্রাথমিকCombinedLoadStatesপাঠায় না, যেটিতে মিডিয়েটর স্টেটগুলো সবসময়nullসেট করা থাকত।
-
- পূর্ববর্তী প্রজন্মগুলোর বাতিলকরণ এখন অবৈধকরণ / নতুন প্রজন্মের ক্ষেত্রে স্বয়ংক্রিয়ভাবে ঘটে।
Flow<PagingData>-তে.collectLatestব্যবহার করার আর প্রয়োজন হবে না, যদিও এখনও তা করার পরামর্শ দেওয়া হয়। -
PagingSource.loadথেকে একটি নতুন রিটার্ন টাইপ হিসেবেPagingSource.LoadResult.Invalidযোগ করা হয়েছে, যা Paging-কে এইPagingSourceজন্য অপেক্ষারত বা ভবিষ্যতের যেকোনো লোড অনুরোধ বাতিল করে দেয় এবং এটিকে অবৈধ করে তোলে। এই রিটার্ন টাইপটি ডাটাবেস বা নেটওয়ার্ক থেকে ফেরত আসা সম্ভাব্য অবৈধ বা পুরোনো ডেটা পরিচালনা করার জন্য ডিজাইন করা হয়েছে। -
.onPagesPresentedএবং.addOnPagesUpdatedListenerপ্রেজেন্টার এপিআই যোগ করা হয়েছে, যেগুলো UI-তে পেজ প্রদর্শিত হওয়ার সাথে সাথে সিনক্রোনাসভাবে ট্রিগার হয়। নিম্নলিখিত পরিস্থিতিতে পেজ আপডেট হতে পারে:- PagingData-এর একটি নতুন প্রজন্মের প্রাথমিক লোড সম্পন্ন হয়, নতুন প্রজন্মটিতে উপস্থাপিত আইটেমগুলিতে কোনো পরিবর্তন থাকুক বা না থাকুক। অর্থাৎ, তালিকাটি হুবহু একই থাকার কারণে কোনো আপডেট ছাড়াই একটি নতুন প্রজন্মের প্রাথমিক লোড সম্পন্ন হলেও এই কলব্যাকটি ট্রিগার হবে।
- একটি পৃষ্ঠা সন্নিবেশিত হয়, এমনকি যদি সন্নিবেশিত পৃষ্ঠাটিতে কোনো নতুন আইটেম না থাকে।
- একটি পৃষ্ঠা বাদ দেওয়া হয়, এমনকি যদি বাদ দেওয়া পৃষ্ঠাটি খালিও থাকে।
সংস্করণ 3.1.0-rc01
৩ নভেম্বর, ২০২১
androidx.paging:paging-*:3.1.0-rc01 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-rc01-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
- পেজিং যখন ডাউনস্ট্রিমে একাধিক লোড ইভেন্ট পাঠাতো এবং তখন কোনো অবজারভার উপস্থিত থাকতো না, অথবা যখন কোনো অবজারভার একটি নতুন পেজিং ডেটা-তে (PagingData) স্থানান্তরিত হচ্ছিলো, সেই ক্ষেত্রে .cachedIn() ফাংশনে একটি রেস কন্ডিশন (race condition) ও মেমোরি লিক (memory leak) সংশোধন করা হয়েছে। ( Ib682e )
সংস্করণ ৩.১.০-বিটা০১
১৩ অক্টোবর, ২০২১
androidx.paging:paging-*:3.1.0-beta01 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-beta01-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।
বাগ সংশোধন
- এমন একটি সমস্যার সমাধান করা হয়েছে যেখানে দ্রুত অনেক আইটেম অ্যাক্সেস করার ফলে সেগুলি prefetchDistance-এর বিবেচনার বাইরে চলে যেত, যার কারণে পেজ লোড হতে দেরি হতো। এই সমস্যাটি বিশেষভাবে দেখা দিত যখন অনেকগুলো আইটেম একসাথে এমন একটি ক্রমে সাজানো থাকত যা ব্যবহারকারীর স্ক্রোল করার দিকের চেয়ে লোড হওয়ার ক্ষেত্রে অগ্রাধিকার দিত। এই আইটেম অ্যাক্সেসগুলো এখন বাফার করা হয় এবং সিনক্রোনাসভাবে অগ্রাধিকার দেওয়া হয় যাতে সেগুলি বাদ না পড়ে। ( aosp/1833273 )
সংস্করণ 3.1.0-alpha04
২৯ সেপ্টেম্বর, ২০২১
androidx.paging:paging-*:3.1.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-alpha04-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
-
Flow<PagingData>.observableএবংFlow<PagingData>.flowableএপিআইগুলো এখন আর পরীক্ষামূলক নয়। ( Ie0bdd )
বাগ সংশোধন
- LoadStates-এর জন্য,
LoadType.REFRESHক্ষেত্রেendOfPaginationReachedএখন সর্বদাfalse। পূর্বে, RemoteMediatorREFRESHজন্য endOfPaginationReachedtrueহতে পারত, কিন্তু PagingSource-এর জন্য নয়। এই আচরণটি এখন একীভূত করা হয়েছে যাতে এটি সর্বদাfalseরিটার্ন করে, কারণ REFRESH-কে টার্মিনাল হিসেবে দেখানো কখনোই যৌক্তিক নয়, এবং এটি এখন LoadStates-এর API চুক্তির অংশ হিসেবে নথিভুক্ত করা হয়েছে। পেজিনেশন টার্মিনেট করা হবে কিনা তা সিদ্ধান্ত নেওয়ার সময়, আপনাকে সর্বদা APPEND অথবা PREPEND ডিরেকশনের সাপেক্ষে তা করতে হবে। ( I047b6 ) পেজিং থেকে লোডস্টেটস এখন জেনারেশনগুলোর মধ্যে ডাউনস্ট্রিমে নির্গত হওয়ার আগে পেজিংসোর্স এবং রিমোটমিডিয়েটর উভয়ের কাছ থেকে বৈধ মানের জন্য অপেক্ষা করে। এর ফলে, পেজিংডেটার নতুন জেনারেশনগুলো যদি আগে থেকেই লোডিং অবস্থায় থাকে, তবে কম্বাইন্ডলোডস্টেটস.সোর্স.রিফ্রেশ-এ নটলোডিং পাঠানো থেকে বিরত থাকে; পেজিংডেটার নতুন জেনারেশনগুলো এখন থেকে রিফ্রেশ স্টেটের জন্য সর্বদা সঠিকভাবে লোডিং দিয়ে শুরু হবে, কিছু ক্ষেত্রে ভুলভাবে প্রথমে নটলোডিং-এ রিসেট হওয়ার পরিবর্তে।
পূর্ববর্তী প্রজন্মগুলির বাতিলকরণ এখন অবৈধকরণ / নতুন প্রজন্মের ক্ষেত্রে স্বয়ংক্রিয়ভাবে ঘটে।
Flow<PagingData>তে .collectLatest ব্যবহার করার আর প্রয়োজন হবে না, যদিও এটি এখনও ব্যবহার করার জন্য জোরালোভাবে সুপারিশ করা হয়। ( I0b2b5 , b/177351336 , b/195028524 )প্রেজেন্টার এপিআই-এর
.loadStateFlowএবং.addLoadStateListenerএখন আর অপ্রয়োজনীয়ভাবে একটি প্রাথমিকCombinedLoadStatesপাঠায় না, যেটিতে মিডিয়েটর স্টেট সবসময়nullএবং সোর্স স্টেটNotLoading(endOfPaginationReached = false)সেট করা থাকতো। এর মানে হলো:- আপনি RemoteMediator ব্যবহার করলে মিডিয়েটরের স্টেটগুলো সর্বদা পূরণ করা থাকবে।
-
.loadStateFlowতে একটি নতুন loadState লিসেনার বা নতুন কালেক্টর রেজিস্টার করলে, যদি এটিPagingDataথেকে একটি আসলCombinedLoadStatesনা পেয়ে থাকে, তাহলে এটি আর তাৎক্ষণিকভাবে বর্তমান মানটি নির্গত করবে না। এমনটা হতে পারে যদি একটিPagingDataজমা দেওয়ার আগেই কোনো কালেক্টর বা লিসেনার চালু হয়ে যায়। ( I1a748 )
সংস্করণ 3.1.0-alpha03
২১ জুলাই, ২০২১
androidx.paging:paging-*:3.1.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 3.1.0-alpha03-এ এই কমিটগুলো রয়েছে।
এপিআই পরিবর্তন
PagingSource-এ তৃতীয় একটি LoadResult রিটার্ন টাইপ, LoadResult.Invalid, যোগ করা হয়েছে। যখন PagingSource.load থেকে LoadResult.Invalid রিটার্ন করা হয়, তখন পেজিং লোড করা ডেটা বাতিল করে দেয় এবং PagingSource-টিকে অবৈধ করে দেয়। এই রিটার্ন টাইপটি ডাটাবেস বা নেটওয়ার্ক থেকে ফেরত আসা সম্ভাব্য অবৈধ বা পুরোনো ডেটা পরিচালনা করার জন্য ডিজাইন করা হয়েছে।
উদাহরণস্বরূপ, যদি অন্তর্নিহিত ডেটাবেসে ডেটা লেখা হয় কিন্তু PagingSource সময়মতো ইনভ্যালিডেট না হয়, তবে এটি অসামঞ্জস্যপূর্ণ ফলাফল দিতে পারে, বিশেষ করে যদি এর ইমপ্লিমেন্টেশনটি যে ব্যাকিং ডেটাসেট থেকে ডেটা লোড করে তার অপরিবর্তনীয়তার উপর নির্ভর করে (যেমন, LIMIT OFFSET ধরনের ডেটাবেস ইমপ্লিমেন্টেশন)। এই পরিস্থিতিতে, লোড করার পরে ইনভ্যালিডেশন পরীক্ষা করার এবং LoadResult.Invalid রিটার্ন করার পরামর্শ দেওয়া হয়, যার ফলে Paging এই PagingSource-এর জন্য অপেক্ষারত বা ভবিষ্যতের যেকোনো লোড অনুরোধ বাতিল করে দেয় এবং এটিকে ইনভ্যালিডেট করে দেয়।
এই রিটার্ন টাইপটি Paging2 API দ্বারাও সমর্থিত, যা LivePagedList বা RxPagedList ব্যবহার করে। Paging2-এর PagedList API-এর সাথে একটি PagingSource ব্যবহার করার সময়, PagedList-টি তাৎক্ষণিকভাবে ডিটাচড হয়ে যায়, ফলে এই PagedList-এ ডেটা লোড করার পরবর্তী প্রচেষ্টা বন্ধ হয়ে যায় এবং PagingSource-টির ইনভ্যালিডেশন শুরু হয়।
LoadResult একটি সিলড ক্লাস, যার মানে হলো এটি একটি সোর্স-ইনকম্প্যাটিবল পরিবর্তন। এর ফলে, যেসব ইউজ কেস সরাসরি PagingSource.load-এর ফলাফল ব্যবহার করে, তাদের কম্পাইল টাইমে LoadResult.Invalid হ্যান্ডেল করতে হবে। উদাহরণস্বরূপ, যেসব কোটলিন ব্যবহারকারী রিটার্ন টাইপ চেক করার জন্য এক্সহস্টিভ-হোয়েন (exhaustive-when) ব্যবহার করেন, তাদের Invalid টাইপের জন্য একটি চেক যোগ করতে হবে। ( Id6bd3 , b/191806126 , b/192013267 )
বাগ সংশোধন
- Invalidation callbacks added via PagingSource.registerInvalidatedCallback or DataSource.addInvalidatedCallback now automatically trigger if they were registered on a PagingSource / DataSource that was already invalid. This resolves a race condition which caused Paging to drop invalidation signals and get stuck when provided a Source which was already invalid during initial load. Additionally, invalidate callbacks are now properly removed after being triggered as they are guaranteed to be called at most once. ( I27e69 )
- Submitting the placeholder initial value (InitialPagedList) from a newly instantiated PagedList stream, eg, LivePagedListBuilder or RxPagedListBuilder will no longer clear previously loaded data.
Version 3.1.0-alpha02
১ জুলাই, ২০২১
androidx.paging:paging-*:3.1.0-alpha02 is released. Version 3.1.0-alpha02 contains these commits.
নতুন বৈশিষ্ট্য
Added onPagesPresented listener and flow presenter APIs which trigger immediately after presented pages are updated in UI.
Since these updates are synchronous with UI, you may call adapter methods such as .snapshot, .getItemCount, to inspect the state after the update has been applied. Note that .snapshot() was left to be explicitly called because it can be expensive to do on every update.
Page updates can happen in the following scenarios:
- Initial load of a new generation of PagingData completes, regardless if the new generation contains any changes to the presented items. ie, A new generation completing initial load with no updates because the list is exactly the same will still trigger this callback.
- A page is inserted, even if the inserted page contains no new items
- A page is dropped, even if the dropped page was empty ( I272c9 , b/189999634 )
বাগ সংশোধন
- Accessing PagedList.dataSource from the initial value produced by LivePagedList or RxPagedList will no longer incorrectly throw an IllegalStateException ( I96707 )
Version 3.1.0-alpha01
২ জুন, ২০২১
androidx.paging:paging-*:3.1.0-alpha01 is released. Version 3.1.0-alpha01 contains these commits.
এপিআই পরিবর্তন
- Classes provided by
paging-rxjava3now live under theandroidx.paging.rxjava3package so that they do not conflict withpaging-rxjava2( Ifa7f6 )
বাগ সংশোধন
- 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 )
External Contribution
- Added deprecated PagedList compat APIs to rxjava3 artifact ( Id1ce2 , b/182497591 )
Paging Compose Version 1.0.0
Version 1.0.0-alpha20
২৪ মে, ২০২৩
androidx.paging:paging-compose:1.0.0-alpha20 is released. Version 1.0.0-alpha20 contains these commits.
নতুন বৈশিষ্ট্য
- Paging Compose now supports previewing a list of fake data by creating a
PagingData.from(fakeData)and wrapping thatPagingDatain aMutableStateFlow(eg,MutableStateFlow(PagingData.from(listOf(1, 2, 3)))). By using that data as the input into your@Preview, calls tocollectAsLazyPagingItems()will provide previewableLazyPagingItems. ( I8a78d , b/194544557 )
বাগ সংশোধন
- Cached data from
pager.flow.cachedInthat has been collected inLazyPagingItemswill now be immediately available after state restoration without requiring asynchronous collection. This means the cached data will be ready for presentation immediately upon initial composition after state is restored. ( I97a60 , b/177245496 )
Version 1.0.0-alpha19
৩ মে, ২০২৩
androidx.paging:paging-compose:1.0.0-alpha19 is released. Version 1.0.0-alpha19 contains these commits.
Supporting all lazy layouts
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 )
এপিআই পরিবর্তন
- 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
২৪ অক্টোবর, ২০২২
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.
এপিআই পরিবর্তন
- Added constructors for
PagingDataAdapterandAsyncPagingDataDifferwhich acceptCoroutineContextinstead ofCoroutineDispatcher. ( Idc878 )
বাগ সংশোধন
-
LazyPagingItemsnow sets the initialloadStateto have aLoadState.Loadingrefresh. ( I55043 , b/224855902 )
Version 1.0.0-alpha14
October 13, 2021
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.
এপিআই পরিবর্তন
-
LazyPagingItems.snapshot()function was replaced withLazyPagingItems.itemSnapshotListproperty ( Ie2da8 ) - Deprecated
LazyPagingItems.getAsState()was removed ( Ie65e4 )
Version 1.0.0-alpha12
২১ জুলাই, ২০২১
androidx.paging:paging-compose:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.
এপিআই পরিবর্তন
-
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 )
Version 1.0.0-alpha11
৩০ জুন, ২০২১
androidx.paging:paging-compose:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
Version 1.0.0-alpha10
২ জুন, ২০২১
androidx.paging:paging-compose:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.
Version 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.
Version 1.0.0-alpha08
২৪ ফেব্রুয়ারি, ২০২১
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
১০ ফেব্রুয়ারী, ২০২১
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 )
Version 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.
Version 1.0.0-alpha02
১১ নভেম্বর, ২০২০
androidx.paging:paging-compose:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
এপিআই পরিবর্তন
- Added
.peek(),.snapshot(),.retry()and.refresh()methods toLazyPagingItems which expose the same functionality available inAsyncPagingDataDiffer/PagingDataAdapter( Iddfe8 , b/172041660 )
Version 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")
}
}
}
সংস্করণ ৩.০.১
সংস্করণ ৩.০.১
২১ জুলাই, ২০২১
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 )
Version 3.0.0
Version 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
২৪ মার্চ, ২০২১
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.
এপিআই পরিবর্তন
- 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
১০ ফেব্রুয়ারী, ২০২১
androidx.paging:paging-*:3.0.0-beta01 is released. Version 3.0.0-beta01 contains these commits.
এপিআই পরিবর্তন
- 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.
এপিআই পরিবর্তন
-
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.
এপিআই পরিবর্তন
- 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.
এপিআই পরিবর্তন
-
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.
এপিআই পরিবর্তন
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
১১ নভেম্বর, ২০২০
androidx.paging:paging-*:3.0.0-alpha09 is released. Version 3.0.0-alpha09 contains these commits.
এপিআই পরিবর্তন
- 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.
এপিআই পরিবর্তন
- 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.
এপিআই পরিবর্তন
- 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
২ সেপ্টেম্বর, ২০২০
androidx.paging:paging-*:3.0.0-alpha06 is released. Version 3.0.0-alpha06 contains these commits.
এপিআই পরিবর্তন
-
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
১৯ আগস্ট, ২০২০
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.
এপিআই পরিবর্তন
- 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.
এপিআই পরিবর্তন
- 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
June 24, 2020
androidx.paging:paging-*:3.0.0-alpha02 is released. Version 3.0.0-alpha02 contains these commits.
এপিআই পরিবর্তন
- 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
- কোটলিন কোরাউটিন এবং ফ্লো-এর জন্য প্রথম শ্রেণীর সমর্থন।
- Support for async loading with coroutines suspend functions, RxJava Single or Guava ListenableFuture primitives .
- রেসপন্সিভ UI ডিজাইনের জন্য বিল্ট-ইন লোড স্টেট এবং এরর সিগন্যাল , যার মধ্যে রিট্রাই এবং রিফ্রেশ কার্যকারিতাও অন্তর্ভুক্ত।
- 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 )
সংস্করণ ২.১.২
সংস্করণ ২.১.২
১৮ মার্চ, ২০২০
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.
সংস্করণ ২.১.১
সংস্করণ ২.১.১
১৮ ডিসেম্বর, ২০১৯
androidx.paging:paging-*:2.1.1 is released. Version 2.1.1 contains these commits .
Bug fixes
- Contiguous initial loads from PositionalDataSources are now centered around last access when placeholders disabled
Version 2.1.0
Version 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
১২ অক্টোবর, ২০১৮
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.
এপিআই পরিবর্তন
- 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
সংস্করণ ২.০.০
সংস্করণ ২.০.০
১ অক্টোবর, ২০১৮
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"
}
সংস্করণ ১.০.১
সংস্করণ ১.০.১
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.
সংস্করণ ১.০.০
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
৫ এপ্রিল, ২০১৮
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 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
২১ মার্চ, ২০১৮
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.
এপিআই পরিবর্তন
-
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
January 22, 2018
বাগ সংশোধন
- 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