Skip to content

♻️ πšƒπš‘πš’πšœ πš™πš›πš˜πš“πšŽπšŒπš πšπšŽπš–πš˜πš—πšœπšπš›πšŠπšπšŽπšœ πšπš‘πšŽ 𝚞𝚜𝚎 𝚘𝚏 πš™πš›πšŽπš™πšŠπš›πš’πš—πš πšŒπšžπšœπšπš˜πš– πš„π™Έ πšŒπš˜πš–πš™πš˜πš—πšŽπš—πšπšœ πšπš˜πš› πš‡π™Όπ™»

License

Notifications You must be signed in to change notification settings

devrath/DroidCustomUi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

π™³πš›πš˜πš’πšπ™²πšžπšœπšπš˜πš–πš„πš’

π™Έπš—πšπš›πš˜πšπšžπšŒπšπš’πš˜πš— πŸ’‘

This project demonstrates the use of preparing the custom ui components. Keeping all the presentation logic of a view group in one place helps in improving the re-usability of the application and also easy maintaining it.

Open Source? Yes! Safe

π™³πšŽπšœπšŒπš›πš’πš™πšπš’πš˜πš—

  • Keeping the code decoupled as much as possible and having it resuable is one of the the important aspects of object oriented programming.
  • While we use view-model,service,repository to seperate and keep the logics reusable, The UI layer also can be done similarly.
  • Now One the the way of doing it is demostrated in the demo here with three varieties of use cases that are extensivey used by developers.

π™°πšπšŸπšŠπš—πšπšŠπšπšŽπšœ

  • Decoupled code
  • Reusable code in presentation logic
  • Can fix bugs in one place and whereever the layer is used that gets reflected everywhere

π™³πš’πšœπšŠπšπšŸπšŠπš—πšπšŠπšπšŽπšœ

  • It consumes extra amount of time and effort to properly organize it

π™΅πš’πš•πšŽπšœ 𝚞𝚜𝚎𝚍 πš™πšŽπš› πš–πš˜πšπšžπš•πšŽ πš’πš— πšπš‘πšŽ πš™πš›πš˜πš“πšŽπšŒπš

Demo Type Files used
πš‚πš’πš—πšπš•πšŽ-πš•πšŽπšŸπšŽπš• πšŒπšžπšœπšπš˜πš– πšŸπš’πšŽπš  πš‚πšŒπš›πšŽπšŽπš— , π™»πšŠπš’πš˜πšžπš , π™²πšžπšœπšπš˜πš–πš…πš’πšŽπš  , π™²πšžπšœπšπš˜πš–πš…πš’πšŽπš π™²πš˜πš—πšπšŽπš—πšπšœ
π™Όπšžπš•πšπš’-πš•πšŽπšŸπšŽπš• πšŒπšžπšœπšπš˜πš– πšŸπš’πšŽπš  πš‚πšŒπš›πšŽπšŽπš— , π™»πšŠπš’πš˜πšžπš , π™΅πš’πš›πšœπšπ™»πšŽπšŸπšŽπš•π™»πšŠπš’πš˜πšžπš , πš‚πšŽπšŒπš˜πš—πšπ™»πšŽπšŸπšŽπš•π™»πšŠπš’πš˜πšžπš , πš‚πšŽπšŒπš˜πš—πšπ™»πšŽπšŸπšŽπš•π™»πšŠπš’πš˜πšžπš , π™ΏπšŠπš›πšŽπš—πšπ™΄πš›πš›πš˜πš›πš…πš’πšŽπš  , π™²πš‘πš’πš•πšπ™΄πš›πš›πš˜πš›πš…πš’πšŽπš 
πš‚πš’πš—πšπš•πšŽ-πš•πšŽπšŸπšŽπš• πšŒπšžπšœπšπš˜πš– πš•πš’πšœπš πšŸπš’πšŽπš  πš‚πšŒπš›πšŽπšŽπš— , π™»πšŠπš’πš˜πšžπš , π™°πšπšŠπš™πšπšŽπš› , π™²πšžπšœπšπš˜πš–π™»πš’πšœπšπ™²πš•πšŠπšœπšœ

π™³πšŽπšœπšŒπš›πš’πš™πšπš’πš˜πš— πšŠπš‹πš˜πšžπš πšπš‘πšŽ πšπšŽπš–πš˜ πš’πš— πš™πš›πš˜πš“πšŽπšŒπš

π™³πšŽπš–πš˜ πšƒπš’πš™πšŽ π™³πšŽπšœπšŒπš›πš’πš™πšπš’πš˜πš—
πš‚πš’πš—πšπš•πšŽ-πš•πšŽπšŸπšŽπš• πšŒπšžπšœπšπš˜πš– πšŸπš’πšŽπš  Here there a custom view which is a error component having a Tryagain click button.
On click of try again button we show a toast
π™Όπšžπš•πšπš’-πš•πšŽπšŸπšŽπš• πšŒπšžπšœπšπš˜πš– πšŸπš’πšŽπš  Here the single level custom component is encapsulated in another level custom component called the parent custom component.
Whenever we pass the event from our screen to parent custom component, It in-turn deligates to child if needed for child.
This we can have any number of nested level of components that can be added.
πš‚πš’πš—πšπš•πšŽ-πš•πšŽπšŸπšŽπš• πšŒπšžπšœπšπš˜πš– πš•πš’πšœπš πšŸπš’πšŽπš  Here we deponstrate the encapsulation of listview in a custom component.
Here we pass the data nd the callback to the custom list component.
There is a interface implemented in the screen from adapter of the list using which adapter can send the selection of item events in adapter

π™³πšŽπš–πš˜ πš™πš›πšŽπšŸπš’πšŽπš  𝚘𝚏 πšπš‘πšŽ πš™πš›πš˜πš“πšŽπšŒπš πŸŽ₯

πš‚πšžπš™πš™πš˜πš›πš β˜•

π™Έπš 𝚒𝚘𝚞 πšπšŽπšŽπš• πš•πš’πš”πšŽ πšœπšžπš™πš™πš˜πš›πš πš–πšŽ 𝚊 𝚌𝚘𝚏𝚏𝚎𝚎 πšπš˜πš› πš–πš’ πšŽπšπšπš˜πš›πšπšœ, 𝙸 πš πš˜πšžπš•πš πšπš›πšŽπšŠπšπš•πš’ πšŠπš™πš™πš›πšŽπšŒπš’πšŠπšπšŽ πš’πš.
π™±πšžπš’ π™ΌπšŽ 𝙰 π™²πš˜πšπšπšŽπšŽ

π™²πš˜πš—πšπš›πš’πš‹πšžπšπšŽ πŸ™‹β€β™‚οΈ

𝚁𝚎𝚊𝚍 πšŒπš˜πš—πšπš›πš’πš‹πšžπšπš’πš˜πš— πšπšžπš’πšπšŽπš•πš’πš—πšŽπšœ πšπš˜πš› πš–πš˜πš›πšŽ πš’πš—πšπš˜πš›πš–πšŠπšπš’πš˜πš— πš›πšŽπšπšŠπš›πšπš’πš—πš πšŒπš˜πš—πšπš›πš’πš‹πšžπšπš’πš˜πš—.

π™΅πšŽπšŽπšπš‹πšŠπšŒπš” ✍️

π™΅πšŽπšŠπšπšžπš›πšŽ πš›πšŽπššπšžπšŽπšœπšπšœ πšŠπš›πšŽ πšŠπš•πš πšŠπš’πšœ πš πšŽπš•πšŒπš˜πš–πšŽ, π™΅πš’πš•πšŽ πšŠπš— πš’πšœπšœπšžπšŽ πš‘πšŽπš›πšŽ.

π™΅πš’πš—πš πšπš‘πš’πšœ πš™πš›πš˜πš“πšŽπšŒπš πšžπšœπšŽπšπšžπš• ? ❀️

πš‚πšžπš™πš™πš˜πš›πš πš’πš πš‹πš’ πšŒπš•πš’πšŒπš”πš’πš—πš πšπš‘πšŽ ⭐ πš‹πšžπšπšπš˜πš— πš˜πš— πšπš‘πšŽ πšžπš™πš™πšŽπš› πš›πš’πšπš‘πš 𝚘𝚏 πšπš‘πš’πšœ πš™πšŠπšπšŽ. ✌️

π™»πš’πšŒπšŽπš—πšœπšŽ Licence πŸ’³

πšƒπš‘πš’πšœ πš™πš›πš˜πš“πšŽπšŒπš πš’πšœ πš•πš’πšŒπšŽπš—πšœπšŽπš πšžπš—πšπšŽπš› πšπš‘πšŽ π™°πš™πšŠπšŒπš‘πšŽ π™»πš’πšŒπšŽπš—πšœπšŽ 𝟸.𝟢 - 𝚜𝚎𝚎 πšπš‘πšŽ π™»π™Έπ™²π™΄π™½πš‚π™΄ πšπš’πš•πšŽ πšπš˜πš› πšπšŽπšπšŠπš’πš•πšœ.

About

♻️ πšƒπš‘πš’πšœ πš™πš›πš˜πš“πšŽπšŒπš πšπšŽπš–πš˜πš—πšœπšπš›πšŠπšπšŽπšœ πšπš‘πšŽ 𝚞𝚜𝚎 𝚘𝚏 πš™πš›πšŽπš™πšŠπš›πš’πš—πš πšŒπšžπšœπšπš˜πš– πš„π™Έ πšŒπš˜πš–πš™πš˜πš—πšŽπš—πšπšœ πšπš˜πš› πš‡π™Όπ™»

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages