Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

マスターへmerge #32

Open
wants to merge 86 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
66dbdc4
Navigationの依存関係を追加
taowata Aug 26, 2020
03bc308
#2 一覧表示機能の実装
shuhei-fujita Aug 26, 2020
33b21df
#2 不要なコードを削除
shuhei-fujita Aug 26, 2020
e206667
Merge pull request #9 from taowata/feature/#2view-event-list
shuhei-fujita Aug 26, 2020
35a6187
.idea/ディレクトリを無視
taowata Aug 26, 2020
0464d7e
Merge pull request #10 from taowata/fix/add-git-ignore
taowata Aug 26, 2020
92c0614
Merge branch 'develop' of https://github.com/taowata/connpass-app-int…
taowata Aug 26, 2020
0ecd465
NavHostフラグメントとnavigation resource ファイルを追加
taowata Aug 26, 2020
5d0be98
2つのフラグメントを追加
taowata Aug 26, 2020
f9784b9
#3 recyclerviewの各rowの画面遷移を実装
shuhei-fujita Aug 26, 2020
c99a047
#3 イベント詳細画面のwebviewのデータの紐付けができた
shuhei-fujita Aug 26, 2020
328e451
BottomNavigationを実装
taowata Aug 26, 2020
67ec997
Merge pull request #12 from taowata/feature/#1add-bottom-navigation
taowata Aug 26, 2020
7b9086b
Merge branch 'develop' into feature/#3view-event-list-detail
shuhei-fujita Aug 26, 2020
8f362f9
ユーザー情報画面のUI作成
taowata Aug 26, 2020
7903063
マテリアルデザイン追加
taowata Aug 26, 2020
c893db8
sharedPreferenceからの読み込み実装
taowata Aug 26, 2020
9d6626a
#3 webviewのデータの紐付け
shuhei-fujita Aug 27, 2020
39f7103
Merge pull request #11 from taowata/feature/#3view-event-list-detail
shuhei-fujita Aug 27, 2020
13f1f50
#5 不要なコードの削除
shuhei-fujita Aug 27, 2020
144dd72
#5 不要なコードの削除
shuhei-fujita Aug 27, 2020
162292d
Dialogの表示
taowata Aug 27, 2020
ede6983
#5 検索画面UIの実装 検索バーとカテゴリーボタン
shuhei-fujita Aug 27, 2020
a756b55
sharedPreferenceをLiveDataで監視する実装に変更
taowata Aug 27, 2020
2c9a825
アラートダイアログでユーザー情報を個別に変更できるように実装
taowata Aug 27, 2020
363c7ac
不要なimport文の削除
taowata Aug 27, 2020
491a173
Merge branch 'develop' of https://github.com/taowata/connpass-app-int…
taowata Aug 27, 2020
d76e725
Merge pull request #14 from taowata/feature/#8create-user-information…
taowata Aug 27, 2020
8e6e1cd
依存関係追加
taowata Aug 27, 2020
335dc62
dao定義
taowata Aug 27, 2020
0565684
データベース追加
taowata Aug 27, 2020
0c0da90
daoのsuspendを取り除いた
taowata Aug 27, 2020
e3ee72b
viewModel定義と呼び出し
taowata Aug 27, 2020
84d892b
イベント名のみ指定してDBに保存
taowata Aug 27, 2020
1b5a3fe
保存済みイベントのリスト表示
taowata Aug 27, 2020
3010953
Merge pull request #15 from taowata/feature/#4add-event-save-database
taowata Aug 27, 2020
fffaa10
保存済みイベントのリストアイテムにボーダーラインとゴミ箱アイコンを追加
taowata Aug 27, 2020
0934c11
Merge pull request #21 from taowata/design-fix/saved-event-list-item
taowata Aug 27, 2020
cd15d28
イベントの削除機能実装、アプリテーマをマテリアルデザインに変更
taowata Aug 27, 2020
9c5f58e
Merge pull request #24 from taowata/feature/#20add-event-delete-function
taowata Aug 27, 2020
87108bc
Merge branch 'develop' into feature/#5add-serch-function
shuhei-fujita Aug 28, 2020
0caa724
#5 リアルタイムじゃない検索機能の実装
shuhei-fujita Aug 28, 2020
bedb1a1
FABボタンタップでイベント保存する機能を実装
taowata Aug 28, 2020
5031c47
不要なコードの削除
taowata Aug 28, 2020
4349a0e
Merge pull request #25 from taowata/feature/#16add-fab-action
taowata Aug 28, 2020
4cf1bfe
保存済みイベント詳細画面への遷移実装
taowata Aug 28, 2020
54f4ae5
Merge pull request #26 from taowata/feature/#7add-saved-event-detail
taowata Aug 28, 2020
561be7c
AppBarのタイトルをnavigation.xmlで管理
taowata Aug 28, 2020
6d70f00
Merge pull request #27 from taowata/fix/action-bar
taowata Aug 28, 2020
d711fb9
保存済みイベントリストのUI更新
taowata Aug 28, 2020
201f688
Merge pull request #28 from taowata/fix/saved-event-list-ui
taowata Aug 28, 2020
921b2ae
#5 検索クエリの実装
shuhei-fujita Aug 28, 2020
3c408df
不要なコードを削除
shuhei-fujita Aug 28, 2020
acaa3e4
#5 fix conflict
shuhei-fujita Aug 28, 2020
0b68675
#5 fix conflict
shuhei-fujita Aug 28, 2020
939064e
Merge pull request #13 from taowata/feature/#5add-serch-function
shuhei-fujita Aug 28, 2020
90cfc69
お気に入りワード1をBottomNavigationで遷移した際のデフォルトの検索ワードに実装
taowata Aug 28, 2020
cce5b0f
bug fix
taowata Aug 28, 2020
5113d11
Merge pull request #30 from taowata/feature/add-default-serch-key
taowata Aug 28, 2020
9e4c689
プロジェクト構造の変更
taowata Aug 28, 2020
df8fc64
検索窓とカテゴリのvisibility
taowata Aug 28, 2020
f560e64
Merge pull request #31 from taowata/fix/view-visibility
taowata Aug 28, 2020
f6735c8
#22 BottomNavigationBarのアイコンを実装
shuhei-fujita Aug 29, 2020
906415d
#35 2つあったdatabindingを削除
shuhei-fujita Aug 29, 2020
40d44e6
#36 クラス外で参照されてない変数をprivateに変更
shuhei-fujita Aug 29, 2020
b7a1ecf
#35 keyを定数で定義
shuhei-fujita Aug 29, 2020
b057e00
#35 Fargmentでactivityの呼び出しを,requireActivity()で定義
shuhei-fujita Aug 29, 2020
bb56e4b
#35 fix
shuhei-fujita Aug 29, 2020
dc7efcf
#35 Fargmentでactivityの呼び出しを,requireActivity()で定義
shuhei-fujita Aug 29, 2020
8cb05f0
#35 keyをcompanion objectないで定義
shuhei-fujita Aug 29, 2020
6210924
#35 ConstraintLayoutないで定義されているmatch_parentを0fpに変更
shuhei-fujita Aug 29, 2020
f8b7c57
databindingを使用可能な部分に適用
taowata Aug 31, 2020
225d9a7
Merge pull request #38 from taowata/fix/#37-add-databinding-to-view
taowata Aug 31, 2020
cc1b348
新しいREADME.mdを追加
taowata Aug 31, 2020
1d4b567
Update README.md
taowata Aug 31, 2020
b23fba3
Update README.md
taowata Aug 31, 2020
c433129
Update README.md
taowata Aug 31, 2020
348ba18
Update README.md
taowata Aug 31, 2020
b0a5757
Update README.md
taowata Aug 31, 2020
bfcc173
Merge pull request #39 from taowata/fix/readme
taowata Aug 31, 2020
80ff23c
#22 iconの修正
shuhei-fujita Sep 6, 2020
43d7699
#22 selectorでボタンの選択,非選択を表示
shuhei-fujita Sep 6, 2020
662e6dd
#22 fix
shuhei-fujita Sep 6, 2020
1d0d9a7
Merge pull request #34 from syuheifujita/feature/22-BottomNavigationB…
taowata Sep 7, 2020
d7b73b4
#35 conflictの解消
shuhei-fujita Sep 8, 2020
ad4ba0d
Merge pull request #40 from taowata/feature/35-fix-review-merge-devel…
taowata Sep 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,7 @@ obj/
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml
.idea/

# OS-specific files
.DS_Store
Expand Down
152 changes: 58 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,58 @@
# Android 3daysサマーインターン当日課題🏄
<img src="https://github.com/ikawashima-cq/Resource/blob/master/caraquri_logo_hz_cmyk%20(2).png" width="90%">

## 目次

<!-- TOC -->
- [課題について](#課題について)
- [プロジェクト概要](#プロジェクト概要)
- [予備知識](#予備知識)
<!-- /TOC -->

## 課題について

### 課題概要
からくり株式会社 Android 3dayサマーインターン(ハッカソン)の当日課題です。
下記の概要を詳しく読んだ上で課題を取り組んでください。

### 課題の取り組み方
- Githubにて`Use this template`を使用し、個人のリポジトリにコピー(publicにして下さい)して課題に取り組んでください。
コーディング規約:
- 標準的なコーディング規約であればどれに準じても良いですが、例として[参考リンク](
https://developer.android.com/kotlin/style-guide?hl=ja)を載せます。

## プロジェクト概要

### アプリ概要
Qiitaの記事を検索するアプリです。

### ビルド環境
- Android Studio: 4.0.1
- Kotlin: 1.4.0-release-Studio4.0-5
- minSdkVersion: 26

### 導入ライブラリ
- [OkHttp](https://square.github.io/okhttp/#okhttp)
- [gson](https://github.com/google/gson)
- [Retrofit2](https://square.github.io/retrofit/)
- [Glide](https://github.com/bumptech/glide)


### 動作確認機種
- お好きなエミュレーター、もしくは実機での確認を推奨しています。

### ビルド方法
- 当日課題Repositoryのgit cloneをお願いします。

### PRを作成する上での注意点
- ローカルでビルドできている
- 動作確認までしている

### 当日までに調べておいて欲しい概念
- アクセス修飾子
- let関数の使い方
- RecyclerView
- 画面遷移
- ライフサイクル

## 予備知識

### GitFlow

- master
- プロダクトとしてリリースするためのブランチ。リリースしたらタグ付けする。
- develop
- 開発ブランチ。コードが安定し、リリース準備ができたら master へマージする。リリース前はこのブランチが最新バージョンとなる。
- feature
- 機能の追加。 develop から分岐し、 develop にマージする。
- release
- プロダクトリリースの準備。develop ブランチにリリース予定の機能やバグフィックスがほぼ反映した状態で develop から分岐する。 リリース準備が整ったら, master にマージし、タグをつける。次に develop にマージする。
- hotfix
- リリース後のクリティカルなバグフィックスなど、 現在のプロダクトのバージョンに対する変更用。 master から分岐し、 master にマージし、タグをつける。次に develop にマージする。

<img src="https://user-images.githubusercontent.com/46508203/77295789-e4ec4e80-6d29-11ea-8608-1f24618d6b0f.png" width="500px">

- [git初心者への道 - お仕事で困らないレベルまでググっとします。 · GitHub](https://gist.github.com/yatemmma/6486028)
- [ Branchについて](https://havelog.ayumusato.com/develop/git/e513-git_branch_model.html)

### 開発をする上で知っておいてほしい基礎知識
- [http通信について](https://qiita.com/AkiyoshiOkano/items/ae4258c1caef3d9e70a2)
- [うまくメソッド名を付けるための参考情報](https://qiita.com/KeithYokoma/items/2193cf79ba76563e3db6)
- [英語のコメントや issue で頻出する略語の意味 (FYI, AFAIK, ...)](https://qiita.com/uasi/items/86c3a09d17792ab62dfe)
- [マークダウン記法 一覧表・チートシート](https://qiita.com/kamorits/items/6f342da395ad57468ae3)

### 開発で使うと便利なツール
項目 | ツール名
--- | ---
APIクライアント | Postman, Pawなど
HTTP通信キャプチャ | Charles
Gitクライアント | Source Treeなど

### 参考資料
- [Android developersの公式ドキュメント](https://developer.android.com/kotlin/first?hl=ja)
- [connpass API リファレンス](https://connpass.com/about/api)
- [リーダブルコード要約](https://qiita.com/AKB428/items/20e81ccc8d9998b5535d)
## アプリ概要
* connpassのイベントを検索するアプリです。

* お気に入りのイベントを保存することができます。

* お気に入りワードを登録しておけば、アプリを開いた際、関連するイベントが一覧表示されます。


イベント検索 | 保存したイベントのリスト表示 | ユーザー情報登録画面
---- | ---- | ----
<img src="https://user-images.githubusercontent.com/47232163/91534054-e0b50480-e94b-11ea-9258-9a48b948011b.png" width="320"/> | <img src="https://user-images.githubusercontent.com/47232163/91534051-e01c6e00-e94b-11ea-846d-526a2eb50e8f.png" width="320"/> | <img src="https://user-images.githubusercontent.com/57245344/91711359-be77ec80-ebc0-11ea-8170-bf208d915735.png" width="320"/>

## 機能・こだわり

* イベント検索

検索窓からイベントの検索ができます。

* お気に入りワードをデフォルトで検索

アプリ起動直後は端末に保存したお気に入りワードで検索されたイベントが表示されるようにしています。

* 検索結果のリスト表示


* お気に入りイベント保存・削除
* 保存したイベントのリスト表示

* ユーザー情報登録画面
* お気に入りワード登録

## ライブラリ
* Android Jetpack
* Foundation
* AppCompat
* Android KTX
* Architecture
* Data Binding
* Lifecycles
* LiveData
* Navigation
* Room
* ViewModel
* UI
* Fragment
* ConstraintLayout
* RecyclerView
* Third party
* Kotlin Coroutines
* [OkHttp](https://square.github.io/okhttp/#okhttp)
* [gson](https://github.com/google/gson)
* [Retrofit2](https://square.github.io/retrofit/)

## 制作者

[@taowata](https://github.com/taowata)

[@syuheifujita](syuheifujita)
45 changes: 44 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs.kotlin"

android {
compileSdkVersion 30
Expand All @@ -18,19 +19,35 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

dataBinding {
enabled = true
}

packagingOptions {
exclude 'META-INF/atomicfu.kotlin_module'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
Expand All @@ -46,6 +63,32 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.11.0'
implementation 'androidx.browser:browser:1.2.0'

// navigation
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"

// material design
implementation 'com.google.android.material:material:1.2.0'

// Room and Lifecycle dependencies
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"

// Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:$room_version"

// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version"

// Groupie
implementation 'com.xwray:groupie:2.3.0'
implementation 'com.xwray:groupie-databinding:2.3.0'

implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha06'
}
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.intern_3days_hackathon

import com.example.intern_3days_hackathon.model.response.ConnpassResponse
import com.example.intern_3days_hackathon.model.ConnpassResponse
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Headers
Expand All @@ -10,5 +10,5 @@ interface ConnpassService {
@GET("event")
@Headers("Content-Type: application/json")
fun getEvents(@Query("count") count: Int,
@Query("query") query: String?): Call<ConnpassResponse>
@Query("keyword") query: String?): Call<ConnpassResponse>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.example.intern_3days_hackathon

class MainViewModel {
//TODO: データの管理
// repository setItems
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.example.intern_3days_hackathon.data

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase

@Database(entities = [SavedEvent::class], version = 1, exportSchema = false)
abstract class EventDatabase : RoomDatabase() {

abstract val savedEventDao: SavedEventDao

companion object {

@Volatile
private var INSTANCE: EventDatabase? = null

fun getInstance(context: Context): EventDatabase {
synchronized(this) {
var instance = INSTANCE

// インスタンス化されていない場合にビルダーを起動
if (instance == null) {
instance = Room.databaseBuilder(
context.applicationContext,
EventDatabase::class.java,
"event_database"
)
.fallbackToDestructiveMigration()
.build()
INSTANCE = instance
}
return instance
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.example.intern_3days_hackathon.data

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "saved_event_table")
data class SavedEvent(
@ColumnInfo(name = "title") var title: String = "",
@ColumnInfo(name = "date") var date: String = "",
@ColumnInfo(name = "location") var location: String = "",
@ColumnInfo(name = "event_url") var url: String = "",
@ColumnInfo(name = "has_finished") var hasFinished: Boolean = false,
@PrimaryKey(autoGenerate = true) val eventId: Int = 0
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.example.intern_3days_hackathon.data

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query

@Dao
interface SavedEventDao {
@Insert
fun insert(event: SavedEvent)

@Delete
fun delete(event: SavedEvent)

@Query("select * from saved_event_table order by date asc")
fun getAllEvent(): LiveData<List<SavedEvent>>

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.intern_3days_hackathon.model.response
package com.example.intern_3days_hackathon.model

import com.google.gson.annotations.SerializedName
import kotlinx.serialization.Serializable
Expand Down Expand Up @@ -63,7 +63,8 @@ data class Event(
val lat: String?,
val lon: String?,
val series: Series
)
) : java.io.Serializable
//ここにserializableが追加された

@Serializable
data class Series(
Expand Down
Loading