-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
29 changed files
with
568 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/thomaskioko/materialmotion/MovieDetailActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.thomaskioko.materialmotion | ||
|
||
import android.os.Bundle | ||
import android.view.WindowManager | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.recyclerview.widget.LinearLayoutManager | ||
import com.thomaskioko.materialmotion.adapter.EpisodeAdapter | ||
import kotlinx.android.synthetic.main.activity_movie_detail.* | ||
|
||
class MovieDetailActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_movie_detail) | ||
|
||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, | ||
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS) | ||
|
||
recycler_view_episodes.apply { | ||
adapter = EpisodeAdapter() | ||
layoutManager = LinearLayoutManager(this@MovieDetailActivity) | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/thomaskioko/materialmotion/SplashScreenActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.thomaskioko.materialmotion | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import kotlinx.android.synthetic.main.activity_splash_screen.* | ||
|
||
class SplashScreenActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_splash_screen) | ||
|
||
//Start the animation | ||
motion_layout_intro.transitionToEnd() | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
app/src/main/java/com/thomaskioko/materialmotion/adapter/EpisodeAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.thomaskioko.materialmotion.adapter | ||
|
||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.thomaskioko.materialmotion.R | ||
|
||
class EpisodeAdapter : RecyclerView.Adapter<EpisodeAdapter.ViewHolder>() { | ||
|
||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | ||
return ViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_episode_layout, parent, false)) | ||
} | ||
|
||
override fun getItemCount(): Int = 50 | ||
|
||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {} | ||
|
||
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) | ||
} |
3 changes: 2 additions & 1 deletion
3
...omaskioko/materialmotion/TweetsAdapter.kt → ...o/materialmotion/adapter/TweetsAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#505b5b5b" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#D35D44" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FFFF" android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM6,9h12v2L6,11L6,9zM14,14L6,14v-2h8v2zM18,8L6,8L6,6h12v2z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#8899A6" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#FFFFFF" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M8,5v14l11,-7z"/> | ||
</vector> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/motion_layout_movie_detail" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/white" | ||
android:fitsSystemWindows="true" | ||
app:layoutDescription="@xml/scene_movie_detail" | ||
tools:context=".MovieDetailActivity"> | ||
|
||
<androidx.appcompat.widget.AppCompatImageView | ||
android:id="@+id/iv_backdrop" | ||
android:layout_width="wrap_content" | ||
android:layout_height="@dimen/dimen_backdrop_image" | ||
android:scaleType="centerCrop" | ||
android:src="@drawable/backdrop" | ||
android:fitsSystemWindows="true" /> | ||
|
||
<com.google.android.material.floatingactionbutton.FloatingActionButton | ||
android:id="@+id/fab_stream" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="8dp" | ||
android:src="@drawable/ic_play_arrow_black_24dp" | ||
android:tint="@color/orange" | ||
app:backgroundTint="@color/white" | ||
app:layout_constraintBottom_toBottomOf="@+id/iv_backdrop" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/iv_backdrop" /> | ||
|
||
|
||
<androidx.cardview.widget.CardView | ||
android:id="@+id/card_view_meta_data" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
app:cardCornerRadius="0dp" | ||
app:cardPreventCornerOverlap="true" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/iv_backdrop"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/cl_meta_data" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<View | ||
android:id="@+id/view" | ||
android:layout_width="match_parent" | ||
android:layout_height="60dp" | ||
android:background="@color/orange" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_episode_name" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:fontFamily="@font/fjalla_one" | ||
android:text="@string/tv_ep_title" | ||
android:textColor="@color/white" | ||
android:textSize="18sp" | ||
app:layout_constraintBottom_toBottomOf="@+id/view" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="@+id/view" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_rating" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:fontFamily="@font/squada_one" | ||
android:text="@string/tv_rating" | ||
android:textColor="@android:color/black" | ||
android:textSize="18sp" | ||
app:layout_constraintBottom_toBottomOf="@+id/ratingBar" | ||
app:layout_constraintStart_toEndOf="@+id/ratingBar" | ||
app:layout_constraintTop_toTopOf="@+id/ratingBar" /> | ||
|
||
<RatingBar | ||
android:id="@+id/ratingBar" | ||
style="@android:style/Widget.DeviceDefault.Light.RatingBar.Small" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="10dp" | ||
android:progressTint="#D35D44" | ||
android:rating="4.5" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/view" /> | ||
|
||
<ImageView | ||
android:id="@+id/imageView2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="10dp" | ||
android:layout_marginEnd="8dp" | ||
android:contentDescription="@null" | ||
android:src="@drawable/ic_chat_black_24dp" | ||
app:layout_constraintEnd_toStartOf="@+id/tv_comments" | ||
app:layout_constraintTop_toBottomOf="@+id/view" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_comments" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="8dp" | ||
android:fontFamily="@font/squada_one" | ||
android:gravity="center" | ||
android:text="@string/text_comment_number" | ||
android:textColor="@android:color/black" | ||
android:textSize="18sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/view" /> | ||
|
||
<TextView | ||
android:id="@+id/textView3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="20dp" | ||
android:layout_marginTop="8dp" | ||
android:fontFamily="@font/fjalla_one" | ||
android:text="@string/tv_movie_title" | ||
android:textColor="@android:color/black" | ||
android:textStyle="bold" | ||
app:layout_constraintStart_toStartOf="@+id/ratingBar" | ||
app:layout_constraintTop_toBottomOf="@+id/ratingBar" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_description" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="8dp" | ||
android:layout_marginBottom="2dp" | ||
android:paddingBottom="4dp" | ||
android:text="@string/text_description" | ||
android:textColor="@android:color/black" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="@+id/textView3" | ||
app:layout_constraintTop_toBottomOf="@+id/textView3" /> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/recycler_view_episodes" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/card_view_meta_data" | ||
tools:listitem="@layout/item_episode_layout" /> | ||
|
||
|
||
</androidx.constraintlayout.motion.widget.MotionLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/motion_layout_intro" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="#1DA1F2" | ||
app:layoutDescription="@xml/scene_intro" | ||
app:showPaths="false" | ||
tools:context=".SplashScreenActivity"> | ||
|
||
<ImageView | ||
android:id="@+id/iv_logo" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="8dp" | ||
android:layout_marginBottom="8dp" | ||
android:contentDescription="@null" | ||
android:src="@drawable/ic_twitter_logo" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="8dp" | ||
android:fontFamily="@font/squada_one" | ||
android:text="@string/text_twitter" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline1" | ||
android:textColor="@color/white" | ||
android:textSize="56sp" /> | ||
|
||
</androidx.constraintlayout.motion.widget.MotionLayout> |
Oops, something went wrong.