Skip to content

My personal learning topic-wise project with inDepth concepts and comments/learning summary.

Notifications You must be signed in to change notification settings

sidsharma2002/AndroidConcepts

Repository files navigation

Android Concepts : Learn By Doing!

My personal learning topic-wise project with inDepth concepts and comments/learning summary. (See unit-tests too) Readme is in progress.

Topics covered [see package structure/prs/branches if not found] :

The use of cache and synchronization on downloading names in this FileDownloadUseCase class is to ensure that the same file is not downloaded multiple times concurrently.The cachedFiles HashMap is used to store previously downloaded files, and the currentlyDownloadingFiles list is used to keep track of files that are currently being downloaded. Before starting a new download, the code checks if the file is already in the cache or if it is being downloaded by another thread. If it is already in the cache, the cached file is returned; if it is being downloaded by another thread, the code waits until the download is complete before starting a new download. This is achieved by using synchronized blocks and wait() and notifyAll() methods on a monitor object.

By doing this, the code ensures that only one thread downloads a file at a time and that files are not downloaded multiple times unnecessarily, which saves time and resources. See Unit-Tests too.

This is an example of a Producer-Consumer pattern, which is a common design pattern in concurrent programming, Demonstrates how multiple threads can work together in a synchronized manner to complete a complex task, and how the Producer-Consumer pattern can be used to manage shared resources (in this case, dishes) between these threads.

The BgThreadPoster class is useful in situations where you need to perform a time-consuming task in the background, such as loading data from a remote server, without blocking the main thread. Less overengineered than coroutines.

WhatsApp.Video.2023-04-24.at.09.17.53.mp4

Released :

WhatsApp Image 2023-04-24 at 09 21 22

Pressed :

WhatsApp Image 2023-04-24 at 09 21 22 (1)

Clicked + Shimmer Animation :

WhatsApp Image 2023-04-24 at 09 21 41

It creates several large collections (ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap) and measures the time taken to perform various operations like adding and removing elements, iterating over elements, etc. The test is meant to compare the performance of different collections under different scenarios and help developers choose the appropriate collection type for their specific use case. See its unit-test here

Problems with fragment and its navigation [wip]

About

My personal learning topic-wise project with inDepth concepts and comments/learning summary.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published