Giter Club home page Giter Club logo

photopagination's Introduction

Photo App Android Jetpack - Implementation Architecture Component Android Jetpack

Source from Unsplash

This is app single activity and using:

Architecture Component

  • Navigation Component
  • LiveData
  • Paging Library
  • Room
  • Lifecycles
  • WorkManager (under development)

Design Pattern

  • Model-View-ViewModel
  • Builder Pattern

Other libraries

  • RxJava + RxAndroid - link
  • Fast Android Networking - link
  • Glide - link
  • PhotoView - link
  • Material Drawer - link
  • Chrome Custom Tabs - with AndroidX support - link

Navigation Component

Navigation refers to the interactions that allow users to navigate across, into, and back out from the different pieces of content within your app. Android Jetpack's Navigation component helps you implement navigation, from simple button clicks to more complex patterns, such as app bars and the navigation drawer. The Navigation component also ensures a consistent and predictable user experience by adhering to an established set of principles. - Google

Basically, navigation components are a new alternative to fragment transactions. So that your application is of good quality with Single Activity. All actions are collected in one xml file and you can simply call the action if needed.

  • main_graph.xml - code

Paging Library

Pagination recyclerview build on DataSource and observing data on viewmodel. Check on code sampe with Rx support

  • DataSource - code
  • SourceFactory - code
  • Observing on ViewModel - code

Room

The Room persistence library provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite. -Google. Check my code for sample with Rx support

  • Model - code
  • Dao - code
  • Repository - code
  • Database - code
  • And implementation using Rx on viewmodel - code

Builder Pattern

Builder pattern is great for classes that can have complex initialization. It typically consists of setting values for multiple variables, some of which may be required with the rest being optional. I Using builder pattern for create get random photo when using some action. Check my code.

  • Builder - code
  • You need interface for create listener - code
  • And implementation - code

Tile Support for Nougat

This app support custom tile in quick setting (check image) and action for random photo (when I creating using builder) and setup wallpaper.

  • Sample code tile service - code
Tile Support
screenshot

Widget support

For device under nougat, I provide widget when same feature.

  • Code for widget - code
  • Preference widget in xml - code

Using DownloadManager

This app using download manager default by android and use Broadcast manager for receiving notify complete

  • Download file - code
  • You need register broadcast and delegate intent filter with DownloadManager.ACTION_DOWNLOAD_COMPLETE - code

Material Design

Material design is beauty for app development, I Using Material Drawer Library by agan Mikepenz for build drawer with amazing ui (chek img and code). This app use chip from material library for place history search and tags.

Screenshot

LICENSE

Copyright 2019 Muhammad Utsman. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

photopagination's People

Contributors

kucingapes avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

siscofran999

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.