Skip to content

Commit

Permalink
Building up
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffnyauke committed Feb 14, 2017
1 parent 3203548 commit b60f56f
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dependencies {
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.dagger:dagger:2.8'
provided 'javax.annotation:jsr250-api:1.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
Expand All @@ -41,8 +40,10 @@ dependencies {
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
provided 'javax.annotation:jsr250-api:1.0'
}

apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private void configureNewsView(ViewHolderNews viewHolderNews, int position) {
Glide.with(activity).load(post.getImage())
.thumbnail(0.2f)
.crossFade()
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(viewHolderNews.getImageView());
}
Expand All @@ -120,6 +121,7 @@ private void configureArticleView(ViewHolderArticle viewHolderArticle, int posit
Glide.with(activity).load(post.getImage())
.thumbnail(0.2f)
.crossFade()
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(viewHolderArticle.getImageView());
}
Expand All @@ -134,6 +136,7 @@ private void configureAuthorView(ViewHolderAuthor viewHolderAuthor, int position
Glide.with(activity).load(post.getImage())
.thumbnail(0.2f)
.crossFade()
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(viewHolderAuthor.getImageView());
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/item_music.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">


<ImageView
Expand All @@ -21,6 +21,7 @@
android:layout_toEndOf="@+id/image"
android:layout_marginTop="@dimen/guideline_half"
android:layout_marginLeft="@dimen/guideline_half"
android:layout_centerVertical="true"
android:orientation="vertical">

<TextView
Expand Down
14 changes: 8 additions & 6 deletions app/src/main/res/layout/item_post_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/guideline_margin"
android:layout_marginBottom="@dimen/guideline_margin"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:background="@color/windowBackground"
android:orientation="vertical">
Expand All @@ -19,7 +19,8 @@
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_half"
android:paddingTop="@dimen/guideline_margin"
android:layout_alignParentLeft="true"
android:text="@string/lorem_ipsum_title"
Expand All @@ -38,7 +39,8 @@
android:textSize="@dimen/text_size_normal"
android:maxLines="6"
android:ellipsize="end"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_half"
android:paddingTop="@dimen/guideline_quarter"
android:layout_toLeftOf="@id/image"
android:text="@string/lorem_ipsum_text"
Expand All @@ -56,7 +58,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:scaleType="centerCrop"
android:paddingRight="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
android:paddingLeft="@dimen/guideline_half"
Expand All @@ -69,7 +71,7 @@
android:text="@string/lorem_ipsum_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
Expand All @@ -87,10 +89,10 @@
android:layout_width="@dimen/image_post_author"
android:adjustViewBounds="true"
android:layout_height="@dimen/image_post_author"
android:scaleType="centerCrop"
android:layout_marginRight="@dimen/guideline_margin"
android:layout_marginTop="@dimen/guideline_margin"
android:layout_marginLeft="@dimen/guideline_half"
android:layout_above="@+id/text"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />

Expand Down
16 changes: 10 additions & 6 deletions app/src/main/res/layout/item_post_author.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/guideline_margin"
android:layout_marginBottom="@dimen/guideline_margin"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:background="@color/windowBackground"
android:orientation="vertical">
Expand All @@ -19,7 +19,8 @@
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:layout_alignParentLeft="true"
android:layout_below="@+id/author"
android:text="@string/lorem_ipsum_title"
Expand All @@ -39,7 +40,8 @@
android:maxLines="6"
android:layout_alignParentLeft="true"
android:ellipsize="end"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_quarter"
android:layout_toLeftOf="@id/image"
android:text="@string/lorem_ipsum_text"
Expand All @@ -57,7 +59,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:scaleType="centerCrop"
android:paddingRight="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
android:paddingLeft="@dimen/guideline_half"
Expand All @@ -70,7 +72,7 @@
android:text="@string/lorem_ipsum_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
Expand All @@ -90,16 +92,18 @@
android:layout_height="@dimen/image_post_author"
android:layout_marginRight="@dimen/guideline_margin"
android:layout_marginLeft="@dimen/guideline_half"
android:scaleType="centerCrop"
android:layout_below="@+id/author"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />

<TextView
android:text="@string/lorem_ipsum_name"
android:textSize="@dimen/text_size_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/guideline_margin"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:textAllCaps="true"
android:textColor="@color/textColorPrimary"
android:id="@+id/author"
Expand Down
17 changes: 11 additions & 6 deletions app/src/main/res/layout/item_post_genre.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/guideline_margin"
android:layout_marginBottom="@dimen/guideline_margin"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:background="@color/windowBackground"
android:orientation="vertical">
Expand All @@ -19,7 +19,8 @@
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:layout_alignParentLeft="true"
android:layout_below="@+id/genre"
android:text="@string/lorem_ipsum_title"
Expand All @@ -38,7 +39,8 @@
android:textSize="@dimen/text_size_normal"
android:maxLines="6"
android:ellipsize="end"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_quarter"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/image"
Expand All @@ -57,7 +59,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:scaleType="centerCrop"
android:paddingRight="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
android:paddingLeft="@dimen/guideline_half"
Expand All @@ -70,7 +72,7 @@
android:text="@string/lorem_ipsum_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
Expand All @@ -90,16 +92,19 @@
android:layout_height="@dimen/image_post_author"
android:layout_marginRight="@dimen/guideline_margin"
android:layout_marginLeft="@dimen/guideline_half"
android:scaleType="centerCrop"
android:layout_below="@+id/genre"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />

<TextView
android:text="@string/lorem_ipsum_name"
android:textSize="@dimen/text_size_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/guideline_margin"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:textAllCaps="true"
android:textColor="@color/textColorPrimary"
android:id="@+id/genre"
Expand Down
14 changes: 8 additions & 6 deletions app/src/main/res/layout/item_post_news.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/guideline_margin"
android:layout_marginBottom="@dimen/guideline_margin"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:background="@color/windowBackground"
android:orientation="vertical">
Expand All @@ -20,9 +20,9 @@
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="170dp"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:visibility="visible"
android:scaleType="centerCrop"
android:importantForAccessibility="yes"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
Expand All @@ -32,7 +32,8 @@
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_margin"
android:layout_alignParentLeft="true"
android:layout_below="@+id/image"
Expand All @@ -52,7 +53,8 @@
android:textSize="@dimen/text_size_normal"
android:maxLines="6"
android:ellipsize="end"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_quarter"
android:text="@string/lorem_ipsum_text"
/>
Expand All @@ -69,7 +71,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:scaleType="centerCrop"
android:paddingRight="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
android:paddingLeft="@dimen/guideline_half"
Expand All @@ -82,7 +84,7 @@
android:text="@string/lorem_ipsum_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/item_post_news_centered.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/guideline_margin"
android:layout_marginBottom="@dimen/guideline_margin"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:background="@color/windowBackground"
android:orientation="vertical">
Expand All @@ -20,10 +20,10 @@
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="170dp"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:visibility="visible"
android:layout_margin="@dimen/guideline_margin"
android:scaleType="centerCrop"
android:importantForAccessibility="yes"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
Expand Down Expand Up @@ -74,7 +74,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:scaleType="centerCrop"
android:paddingRight="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
android:paddingLeft="@dimen/guideline_half"
Expand All @@ -87,7 +87,7 @@
android:text="@string/lorem_ipsum_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/guideline_half"
android:paddingLeft="@dimen/guideline_margin"
android:paddingTop="@dimen/guideline_space"
android:paddingRight="@dimen/guideline_space"
android:paddingBottom="@dimen/guideline_space"
Expand Down
14 changes: 9 additions & 5 deletions app/src/main/res/layout/item_video.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_width="100dp"
android:layout_height="match_parent">


Expand All @@ -22,17 +22,21 @@

<TextView
android:text="TextView"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimaryDark"
android:maxLines="2"
android:lines="2"
android:ellipsize="end"
android:textColor="@color/textColorPrimaryDark"
android:id="@+id/title" />

<TextView
android:text="TextView"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/guideline_quarter_half"
android:textColor="@color/colorPrimary"
android:ellipsize="end"
android:textColor="@color/textColorPrimary"
android:textSize="@dimen/text_size_small"
android:id="@+id/timestamp" />

Expand Down
Loading

0 comments on commit b60f56f

Please sign in to comment.