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

マスターへmerge #32

wants to merge 86 commits into from

Conversation

taowata
Copy link
Owner

@taowata taowata commented Aug 28, 2020

アプリ概要

  • connpassのイベントを検索するアプリです。

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

機能・こだわり

  • イベント検索

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

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

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

  • 検索結果のリスト表示

  • お気に入りイベント保存・削除

  • 保存したイベントのリスト表示

  • ユーザー情報登録画面

  • お気に入りワード登録

イベント検索 保存したイベントのリスト表示 ユーザー情報登録画面

taowata and others added 30 commits August 26, 2020 16:40
.idea/ディレクトリを無視
 into feature/#8create-user-information-registration
…-registration

Feature/#8create user information registration
エンティティクラス作成
@ghost
Copy link

ghost commented Aug 28, 2020

before after after after

Copy link

@hyoshimi-cq hyoshimi-cq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

良くできてます!

app/build.gradle Outdated
jvmTarget = '1.8'
}
dataBinding {
enabled = true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataBindingが2つある 🙄

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
906415d


class EventListDetailFragment : Fragment() {

private var event: Event? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by lazyを使うと良いかも(書き方が違うかもしれないのでby lazyの使い方調べてみてください)

private var event: Event? by lazy {
  argument.getSerializable(CONNPASS_EVENTS) as? Event
}


class SearchActivity : AppCompatActivity() {

var searchKey: String? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

privaste

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
40d44e6

override fun onQueryTextSubmit(query: String?): Boolean {
searchKey = query.toString()
val bundle = Bundle()
bundle.putString("searchKey", searchKey)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

searchKey を定数にする

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
b7a1ecf

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

val appCompatActivity = activity as AppCompatActivity?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requireActivity() を使う

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
dc7efcf

title = event!!.title,
date = event!!.startedAt,
location = event!!.address ?: "不明",
url = event!!.eventURL,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

強制アンラップは禁止

event?.let {
  SavedEvent(title = it.title)
}

val prefs = context?.getSharedPreferences(UserInformationViewModel.PREF, Context.MODE_PRIVATE)
val favWord1 = prefs?.getString(UserInformationViewModel.KEY_FAV_WORD1, "Kotlin")

EventListRepository.listArticle(PER_PAGE, favWord1).observe(viewLifecycleOwner, androidx.lifecycle.Observer { events: ArrayList<Event> ->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EventListRepository.listArticle()を2回呼んでるので引数だけ変わるような実装にしたい

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
8cb05f0

import com.example.intern_3days_hackathon.R

private const val ARG_PARAM1 = "key"
private const val ARG_PARAM2 = "value"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

できればここには書きたくない

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
8cb05f0

class UserEditDialogFragment : DialogFragment() {

private var KEY: String? = "key"
private var VALUE: String? = "value"
Copy link

@hyoshimi-cq hyoshimi-cq Aug 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

キャメルケースで書く。プロジェクトで揃える

android:id="@+id/search_layout_frame"
<SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConstraintLayoutの中ではmatch_parentは使いたくない

Copy link
Collaborator

@shuhei-fujita shuhei-fujita Aug 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taowata
ここ修正しましたっ
6210924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants