Giter Site home page Giter Site logo

droidkaigi / conference-app-2017 Goto Github PK

View Code? Open in Web Editor NEW
470.0 128.0 142.0 12.03 MB

The Official Conference App for DroidKaigi 2017 Tokyo

License: Apache License 2.0

Java 44.90% Shell 0.09% Kotlin 6.19% Ruby 0.29% HTML 48.54%
droidkaigi conference android-app android

conference-app-2017's Introduction

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

  • View conference schedule and details of each session
  • Set notification for upcoming sessions on your preference
  • View a map
  • Search sessions and speakers

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.

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

Custom attributes are also used like below.

<ImageView
    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.

@BindingAdapter("photoImageUrl")
public static void setPhotoImageUrl(ImageView imageView, @Nullable String imageUrl) {
  setImageUrl(imageView, imageUrl, R.color.grey200);
}

private static void setImageUrl(ImageView imageView, @Nullable String imageUrl, @DrawableRes int placeholderResId) {
  if (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.

src/main/java/io/github/droidkaigi/confsched2017/di
|
|--scope
|  |--ActivityScope.java  : Scope annotation for objects being alive within activity lifecycle
|  |--FragmentScope.java  : Scope annotation for objects being alive within fragment lifecycle
|
|--AndroidModule.java     : Provides system services(e.g. PackageManager, ActivityManager)
|--ActivityComponent.java :
|--ActivityModule.java    : Provides activity-scoped objects
|--AppComponent.java      :
|--AppModule.java         : Provides application-scoped objects(e.g. SharedPreferences, HttpClient)
|--FragmentComponent.java :
|--FragmentModule.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.

@Table
public 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

  • In model package.
  • These models are POJO.
  • They are converted from API json response via Retrofit2, and stored to Database via Android-Orma.
@Table
public class Speaker {

  @PrimaryKey(auto = false)
  @Column(indexed = true)
  @SerializedName("id")
  public int id;

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

  @Column
  @Nullable
  @SerializedName("image_url")
  public String imageUrl;

  ...
}

View

  • In view package.
  • "View" is not only layout xml file. Activities and Fragments are also "View".
  • "View" is refreshed by viewModel when onResume() is called.

ViewModel

  • In viewmodel package
  • "ViewModel" has all properties which is shown in "View".
  • They are bound by DataBinding. In this app, setText(), setImageResource() or setVisibility() are not used.
  • The events such as OnClickListener() are also bound by DataBinding.
<RelativeLayout
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:background="@drawable/clickable_white"
  android:clickable="@{viewModel.clickable}"
  android:onClick="@{viewModel::showSessionDetail}"
  app:sessionCellBackground="@{viewModel.backgroundResId}"
  app:twowayview_colSpan="@{viewModel.colSpan}"
  app:twowayview_rowSpan="@{viewModel.rowSpan}">

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

</RelativeLayout>
  • "ViewModel" has business logic.
  • If it's necessary to load data, "ViewModel" uses Repository class or DefaultPref class which are provided by Dagger2.
@Inject
SessionsViewModel(SessionsRepository sessionsRepository, MySessionsRepository mySessionsRepository) {
  this.sessionsRepository = sessionsRepository;
  this.mySessionsRepository = mySessionsRepository;
}

Credit

This project uses some modern Android libraries.

License

Copyright 2017 DroidKaigi

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.

conference-app-2017's People

Contributors

amay077 avatar chibatching avatar cutmail avatar eneim avatar gen0083 avatar gfx avatar horie1024 avatar hotchemi avatar jfsso avatar jmatsu avatar k-kagurazaka avatar keithyokoma avatar ken5scal avatar kikuchy avatar konifar avatar kwmt avatar moyuruaizawa avatar noboru-i avatar ogapants avatar pluu avatar roana0229 avatar ryugoo avatar shiraji avatar sumio avatar sys1yagi avatar takuaraki avatar tnj avatar tomoima525 avatar u-nation avatar yatatsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

conference-app-2017's Issues

Create sessions search

Overview (Required)

Basically DroidKaigi 2016 Search page is good.

Droidcon Berlin app is also good.

Integrate CI

Overview (Required)

I'll integrate to CircleCI.

But actually I'm not sure which CI is the best.
If you know better CI service, we can always replace.

Create session detail page

Overview (Required)

Just create, no improve.
I have some improvement idea, but they should be done as other issues.

Arranged Android resources

Overview (Required)

I'll arrange resources xml files under res dir.
This is related to my droidkaigi session which title is "Android Resources Refactoring" 😃

Create main page

Overview (Required)

  • I think it's better to use BottomNavigation than NavigationDrawer.
  • I had already investigated BottomNavigation, maybe it fits DroidKaigi2017 app.

These are main contents

  • Sessions
  • Map
  • Settings
  • About
    • Sponsors
    • Notifications
    • Questionaire

Integrate to waffle.io

Overview (Required)

I love waffle.io which shows the issues to Kanban style.
I tried to use GitHub project before, but it's not good for me 😢

Create PR and issue template

Overview

I'll create .github/PULL_REQUEST_TEMPLATE.md and .github/ISSUE_TEMPLATE.md
I don't like complex and detailed template. Simple is better.

Changed debug app name

Overview (Required)

Create debug/res/values/strings_no_trans.xml

<resources>
    <string name="app_name" translatable="false">DroidKaigi 2017 Debug</string>
</resources>

Use RecyclerView custom LayoutManager

Overview (Required)

To be honest, I wanted to use RecyclerView custom LayoutManager.
But it's difficult to catch up in a short time.
So I implemented like this.

If we use LayoutManager, the users can swipe vertically, horizontally, and diagonally.

Links

Add Contributors section to README

Overview (Required)

ありがとう! コピーライト書き換えたけど、余裕があったらコントリビューターのなまえだしたいなぁ。

💪

Links

Screenshot

Create the ceremony animation

Overview (Required)

I want to show cool ceremony animation like fireworks.
When DroidKaigi will be started, the animation will be shown.

Added debug launcher icon

Overview (Required)

  • src/debug/res/mipmap-hdpi/ic_launcher.png
  • src/debug/res/mipmap-mdpi/ic_launcher.png
  • src/debug/res/mipmap-xdpi/ic_launcher.png
  • src/debug/res/mipmap-xxdpi/ic_launcher.png
  • src/debug/res/mipmap-xxxdpi/ic_launcher.png

Add GoogleAnalytics

Overview (Required)

  • Apply GoogleAnalytics
  • Define screen names
  • Define event names

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.