-
Notifications
You must be signed in to change notification settings - Fork 12
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
Issue #14 #21
base: develop
Are you sure you want to change the base?
Issue #14 #21
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.gdgistanbul.attendence.ui.event_detail | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import androidx.fragment.app.Fragment | ||
import androidx.navigation.fragment.navArgs | ||
import com.gdgistanbul.attendence.extension.observe | ||
import com.gdgistanbul.model.Event | ||
import com.gdgistanbul.viewmodel.MeetupViewModel | ||
import kotlinx.android.synthetic.main.fragment_event_detail.* | ||
import org.koin.android.ext.android.inject | ||
|
||
class EventDetailFragment : Fragment() { | ||
private val viewModel: MeetupViewModel by inject() | ||
private val args: EventDetailFragmentArgs by navArgs() | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
observe(viewModel.eventLiveData) { initUI(it) } | ||
|
||
var eventID = args.eventID | ||
|
||
viewModel.getEvent(eventID) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could delete unnecessary spaces. |
||
|
||
} | ||
|
||
fun initUI(event: Event) { | ||
btnBack.setOnClickListener { | ||
activity?.supportFragmentManager?.beginTransaction()?.remove(this)?.commit() | ||
} | ||
|
||
txtEventName.text = event.name | ||
txtEventDate.text = event.localDate | ||
txtEventVenue.text = event.venue?.name | ||
|
||
txtAttendee.text = "${event.yesRsvpCount} Attendees" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use strings.xml |
||
|
||
txtDetail.text = event.description | ||
|
||
btnCheckIn.setOnClickListener { | ||
//TODO attendees page | ||
} | ||
Comment on lines
+41
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please do. navigate to UserListFragment and use safe args to pass eventid. |
||
|
||
//TODO need event photo link | ||
// Glide.with(context) | ||
// .load(event.) | ||
// .transition(DrawableTransitionOptions.withCrossFade()) | ||
// .skipMemoryCache(true) | ||
// .into(ivImage) | ||
Comment on lines
+45
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm I checked the api and seems like we are not able to get the image from the api so we need to remove the image and move the rest of the page up |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ import androidx.fragment.app.Fragment | |
import com.gdgistanbul.attendence.R | ||
import com.gdgistanbul.attendence.extension.navigate | ||
import com.gdgistanbul.attendence.extension.onClick | ||
import com.gdgistanbul.model.Event | ||
import kotlinx.android.synthetic.main.fragment_event_list.* | ||
|
||
class EventListFragment : Fragment() { | ||
|
@@ -28,5 +29,8 @@ class EventListFragment : Fragment() { | |
val eventID = (0..99999999).random() | ||
navigate(EventListFragmentDirections.actionEventListFragmentToUserListFragment(eventID)) | ||
} | ||
|
||
// val event:Event = Event() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could delete this if It's unnecessary |
||
// navigate(EventListFragmentDirections.actionEventListFragmentToEventDetailFragment(event)) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="11dp" | ||
android:height="20dp" | ||
android:viewportWidth="11" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M10.699,18.228l-0.892,-0.895 -2.133,-2.14 -2.582,-2.587 -2.228,-2.236c-0.361,-0.362 -0.718,-0.73 -1.085,-1.088l-0.014,-0.015v1.47l0.891,-0.894 2.134,-2.14 2.579,-2.587L9.598,2.88c0.36,-0.362 0.725,-0.722 1.084,-1.088l0.015,-0.015c0.188,-0.19 0.302,-0.468 0.302,-0.736 0,-0.256 -0.112,-0.56 -0.302,-0.737 -0.197,-0.18 -0.457,-0.316 -0.734,-0.303a1.087,1.087 0,0 0,-0.734 0.303l-0.892,0.895 -2.133,2.14 -2.58,2.588 -2.228,2.236c-0.36,0.362 -0.726,0.721 -1.084,1.088l-0.015,0.014a1.059,1.059 0,0 0,0 1.47l0.892,0.895c0.71,0.714 1.422,1.427 2.133,2.14L5.9,16.358l2.229,2.236c0.36,0.362 0.72,0.728 1.084,1.088l0.015,0.014c0.188,0.19 0.466,0.304 0.734,0.304 0.255,0 0.557,-0.112 0.734,-0.304 0.18,-0.197 0.315,-0.457 0.302,-0.736a1.08,1.08 0,0 0,-0.3 -0.732z" | ||
android:fillColor="#FFF" | ||
android:fillType="nonZero"/> | ||
</vector> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/lipstick"/> | ||
<corners android:radius="4dp"/> | ||
</shape> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/lipstick"/> | ||
<corners android:radius="4dp"/> | ||
</shape> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/white_three"/> | ||
<corners android:radius="2dp"/> | ||
</shape> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all dp values can coming from dimens folder |
||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using ConstraintLayout in ConstraintLayout isn't recommended situation. Is there any better way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If ConstrainsLayout is used somewhere, we shouldn't need another layout type. That's because you can position any view wherever you want. ConstraintLayout provides this functionality with its powerful attributes. |
||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.google.android.material.imageview.ShapeableImageView | ||
android:id="@+id/btnBack" | ||
android:layout_width="11dp" | ||
android:layout_height="20dp" | ||
android:layout_marginTop="65dp" | ||
android:layout_marginStart="16dp" | ||
android:background="@drawable/back" | ||
android:elevation="1dp" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintStart_toStartOf="parent"/> | ||
|
||
<com.google.android.material.imageview.ShapeableImageView | ||
android:id="@+id/ivImage" | ||
android:layout_width="0dp" | ||
android:layout_height="200dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:background="@drawable/df18_home"/> | ||
|
||
<com.google.android.material.card.MaterialCardView | ||
android:id="@+id/cvEventInfo" | ||
android:layout_width="0dp" | ||
android:layout_height="140dp" | ||
android:layout_marginStart="32dp" | ||
android:layout_marginTop="130dp" | ||
android:layout_marginEnd="32dp" | ||
app:cardBackgroundColor="@color/white_three" | ||
app:cardCornerRadius="10dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/txtEventName" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginTop="24dp" | ||
android:fontFamily="@font/nunito_extrabold" | ||
android:textColor="@color/dark_grey_blue" | ||
android:textSize="16sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="GDG DevFest Istanbul 2019" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/txtEventDate" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="16dp" | ||
android:fontFamily="@font/nunito_semibold" | ||
android:textColor="@color/text_color" | ||
android:textSize="12sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/txtEventName" | ||
tools:text="24 Aug, 2pm" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/txtEventVenue" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
android:fontFamily="@font/nunito_semibold" | ||
android:textColor="@color/text_color" | ||
android:textSize="12sp" | ||
app:layout_constraintStart_toStartOf="@id/txtEventDate" | ||
app:layout_constraintTop_toBottomOf="@id/txtEventDate" | ||
tools:text="Kolektif House Maslak" /> | ||
Comment on lines
+49
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use or add text styles defined in app/src/main/res/values/type.xml |
||
|
||
<View | ||
android:id="@+id/vAttendee" | ||
android:layout_width="98dp" | ||
android:layout_height="32dp" | ||
android:layout_marginEnd="16dp" | ||
android:alpha="0.15" | ||
android:background="@drawable/bg_lipstick_4rd" | ||
android:padding="8dp" | ||
app:layout_constraintBottom_toBottomOf="@id/txtEventVenue" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/txtEventDate" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/txtAttendee" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:fontFamily="@font/nunito_bold" | ||
android:textColor="@color/lipstick" | ||
android:textSize="12sp" | ||
app:layout_constraintBottom_toBottomOf="@id/vAttendee" | ||
app:layout_constraintEnd_toEndOf="@id/vAttendee" | ||
app:layout_constraintStart_toStartOf="@id/vAttendee" | ||
app:layout_constraintTop_toTopOf="@id/vAttendee" | ||
tools:text="190 Attendees" /> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
</com.google.android.material.card.MaterialCardView> | ||
|
||
<com.google.android.material.button.MaterialButton | ||
android:id="@+id/btnCheckIn" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="21dp" | ||
android:layout_marginTop="43dp" | ||
android:layout_marginEnd="21dp" | ||
android:fontFamily="@font/nunito_extrabold" | ||
android:textColor="@color/white_three" | ||
android:textSize="16sp" | ||
app:layout_constraintEnd_toEndOf="@+id/cvEventInfo" | ||
app:layout_constraintStart_toStartOf="@+id/cvEventInfo" | ||
app:layout_constraintTop_toBottomOf="@id/ivImage" | ||
tools:text="Start Check-In" /> | ||
|
||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/txtDetailTitle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="40dp" | ||
android:fontFamily="@font/nunito_extrabold" | ||
android:text="Detail" | ||
android:textColor="@color/dark_grey_blue" | ||
android:textSize="16sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/btnCheckIn" | ||
tools:text="Details" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/txtDetail" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="16dp" | ||
android:layout_marginBottom="62dp" | ||
android:fontFamily="@font/nunito_regular" | ||
android:textColor="@color/text_color" | ||
android:textSize="14sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/txtDetailTitle" | ||
tools:text="Merhabalar,\nGDG Istanbul olarak 24 Ağustos Cumartesi günü Google ve JetBrains'in desteklediği Kotlin/Everywhere etkinlik serisinin bir parçası olarak Kotlin/Everywhere Istanbul etkinliğini Kolektif House Maslak'ta gerçekleştiriyoruz. Bu etkinlikte Android, Google Cloud Platform ve Multi-platform alanlarında Kotlin temellerini ve best practise'lerini öğreneceğiz.\nEtkinlik programı konuşmacı başvuruları tamamlandıktan sonra hazırlanıp paylaşılacaktır. Eğer sizde bu etkinlikte konuşmacı olarak yer almak, Kotlin deneyimlerinizi bizlerle paylaşmak isterseniz CFP formunu hemen doldurabilirsiniz.\nCall For Paper 👉🏻 https://gdg.ist/cfp-kotlin-everywhere\nEtkinlik Programı; " /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</ScrollView> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ object ThirdPartyLibraries { | |
const val moshi = "com.squareup.moshi:moshi-kotlin:${Versions.moshiVersion}" | ||
const val moshiapt = "com.squareup.moshi:moshi-kotlin-codegen:${Versions.moshiVersion}" | ||
const val moshiConverter = "com.squareup.retrofit2:converter-moshi:2.5.0" | ||
const val glide = "com.github.bumptech.glide:glide:4.10.0" | ||
selahattinkole marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Versions should be defined in the separated class. |
||
} | ||
|
||
object AndroidxLibraries { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could delete this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets keep it. there are other comments like this in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can delete all comments in the file. naming is clear enough, we don't need to comments.