DroidKaigi/conference-app-2017

Name: conference-app-2017

Owner: DroidKaigi

Description: The Official Conference App for DroidKaigi 2017 Tokyo

Created: 2017-01-16 09:47:53.0

Updated: 2018-01-16 07:06:55.0

Pushed: 2017-03-11 13:51:29.0

Homepage:

Size: 12340

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

DroidKaigi 2017 official Android app CircleCI Stories in Ready codecov

DroidKaigi 2017 is a conference tailored for developers on 9th and 10th March 2017.

Try it on your device via DeployGate

Features

Contributing

We use waffle.io to manage tasks. If you'd like to contribute to the project but are not sure where to start off, please look for issues labelled welcome contribute.

We've designated these issues as good candidates for easy contribution. You can always fork the repository and send a pull request (on a branch other than master).

We do accept suggestions for translations at this page.

Development Environment

This app depends on several libraries and plugins so make sure to set them up correctly.

Java8 & retrolambda support

This project uses Java8 and retrolambda. If you haven't set up Java8 yet, install it from here, and set env JAVA_HOME or JAVA8_HOME.

Kotlin

Tests are written in Kotlin!

DataBinding

This project tries to use DataBinding.

tView
droid:id="@+id/txt_title"
droid:layout_width="wrap_content"
droid:layout_height="wrap_content"
droid:maxLines="@{viewModel.titleMaxLines}"
droid:text="@{viewModel.title}" />

Custom attributes are also used like below.

geView
android:id="@+id/img_speaker"
android:layout_width="@dimen/image_size"
android:layout_height="@dimen/image_size"
app:photoImageUrl="@{viewModel.imageUrl}" />

BindingAdapter like photoImageUrl is written in DataBindingHelper.java.

dingAdapter("photoImageUrl")
ic static void setPhotoImageUrl(ImageView imageView, @Nullable String imageUrl) {
tImageUrl(imageView, imageUrl, R.color.grey200);


ate static void setImageUrl(ImageView imageView, @Nullable String imageUrl, @DrawableRes int placeholderResId) {
 (TextUtils.isEmpty(imageUrl)) {
imageView.setImageDrawable(ContextCompat.getDrawable(imageView.getContext(), placeholderResId));
else {
Picasso.with(imageView.getContext())
       .load(imageUrl)
       .placeholder(placeholderResId)
       .error(placeholderResId)
       .into(imageView);


Dagger2

This project uses DI library Dagger2. See classes in di package.

main/java/io/github/droidkaigi/confsched2017/di

cope
--ActivityScope.java  : Scope annotation for objects being alive within activity lifecycle
--FragmentScope.java  : Scope annotation for objects being alive within fragment lifecycle

ndroidModule.java     : Provides system services(e.g. PackageManager, ActivityManager)
ctivityComponent.java :
ctivityModule.java    : Provides activity-scoped objects
ppComponent.java      :
ppModule.java         : Provides application-scoped objects(e.g. SharedPreferences, HttpClient)
ragmentComponent.java :
ragmentModule.java    : Provides fragment-scoped objects
Orma

This project uses ORM library Android-Orma. Android-Orma is a lightning-fast and annotation based wrapper library of SQLiteDatabase.

Some model classes in model package having @Table annotation.

le
ic class Session {
@Column(indexed = true)
@SerializedName("id")
public int id;

@Column(indexed = true)
@SerializedName("title")
public String title;

// ...

These classes are saved and updated in database via repository/XXXLocalDataSource. To know more about Android-Orma, see document.

Architecture

This app uses an simple MVVM (Model-View-ViewModel) architecture using DataBinding, dependency injection and OR-mapper.

Model
le
ic class Speaker {

rimaryKey(auto = false)
olumn(indexed = true)
erializedName("id")
blic int id;

olumn(indexed = true)
erializedName("name")
blic String name;

olumn
ullable
erializedName("image_url")
blic String imageUrl;

.

View
ViewModel
ativeLayout
droid:layout_width="wrap_content"
droid:layout_height="wrap_content"
droid:background="@drawable/clickable_white"
droid:clickable="@{viewModel.clickable}"
droid:onClick="@{viewModel::showSessionDetail}"
p:sessionCellBackground="@{viewModel.backgroundResId}"
p:twowayview_colSpan="@{viewModel.colSpan}"
p:twowayview_rowSpan="@{viewModel.rowSpan}">

iew
android:id="@+id/categoryBorder"
android:layout_width="match_parent"
android:layout_height="3dp"
android:visibility="@{viewModel.normalSessionItemVisibility}"
app:sessionTopicColor="@{viewModel.topicColorResId}" />
...

lativeLayout>
ect
ionsViewModel(SessionsRepository sessionsRepository, MySessionsRepository mySessionsRepository) {
is.sessionsRepository = sessionsRepository;
is.mySessionsRepository = mySessionsRepository;

Credit

This project uses some modern Android libraries.

License

right 2017 DroidKaigi

nsed under the Apache License, Version 2.0 (the "License");
may not use this file except in compliance with the License.
may obtain a copy of the License at

ttp://www.apache.org/licenses/LICENSE-2.0

ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.