Use a gradient at the bottom of the cover. Remove external repositories from gradle
This commit is contained in:
		
							parent
							
								
									59cc87c583
								
							
						
					
					
						commit
						b174adbab0
					
				| @ -93,6 +93,7 @@ dependencies { | |||||||
|     compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION" |     compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION" | ||||||
|     compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION" |     compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION" | ||||||
|     compile "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION" |     compile "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION" | ||||||
|  |     compile "com.android.support:percent:$SUPPORT_LIBRARY_VERSION" | ||||||
|     compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.2' |     compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.2' | ||||||
|     compile 'com.squareup.okhttp:okhttp:2.7.2' |     compile 'com.squareup.okhttp:okhttp:2.7.2' | ||||||
|     compile 'com.squareup.okio:okio:1.6.0' |     compile 'com.squareup.okio:okio:1.6.0' | ||||||
| @ -116,7 +117,7 @@ dependencies { | |||||||
|     compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4' |     compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4' | ||||||
|     compile 'eu.davidea:flexible-adapter:4.2.0' |     compile 'eu.davidea:flexible-adapter:4.2.0' | ||||||
|     compile 'com.nononsenseapps:filepicker:2.5.1' |     compile 'com.nononsenseapps:filepicker:2.5.1' | ||||||
|     compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' |     compile 'com.github.amulyakhare:TextDrawable:558677e' | ||||||
|     compile 'com.github.pwittchen:reactivenetwork:0.1.5' |     compile 'com.github.pwittchen:reactivenetwork:0.1.5' | ||||||
| 
 | 
 | ||||||
|     compile "com.google.dagger:dagger:$DAGGER_VERSION" |     compile "com.google.dagger:dagger:$DAGGER_VERSION" | ||||||
|  | |||||||
| @ -67,7 +67,7 @@ public class LibraryCategoryAdapter extends FlexibleAdapter<LibraryHolder, Manga | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public int getCoverHeight() { |     public int getCoverHeight() { | ||||||
|         return fragment.recycler.getItemWidth() / 9 * 12; |         return fragment.recycler.getItemWidth() / 3 * 4; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| package eu.kanade.tachiyomi.ui.library; | package eu.kanade.tachiyomi.ui.library; | ||||||
| 
 | 
 | ||||||
| import android.view.View; | import android.view.View; | ||||||
|  | import android.widget.FrameLayout; | ||||||
| import android.widget.ImageView; | import android.widget.ImageView; | ||||||
| import android.widget.TextView; | import android.widget.TextView; | ||||||
| 
 | 
 | ||||||
| @ -17,6 +18,7 @@ import static android.widget.RelativeLayout.LayoutParams; | |||||||
| 
 | 
 | ||||||
| public class LibraryHolder extends FlexibleViewHolder { | public class LibraryHolder extends FlexibleViewHolder { | ||||||
| 
 | 
 | ||||||
|  |     @Bind(R.id.image_container) FrameLayout container; | ||||||
|     @Bind(R.id.thumbnail) ImageView thumbnail; |     @Bind(R.id.thumbnail) ImageView thumbnail; | ||||||
|     @Bind(R.id.title) TextView title; |     @Bind(R.id.title) TextView title; | ||||||
|     @Bind(R.id.unreadText) TextView unreadText; |     @Bind(R.id.unreadText) TextView unreadText; | ||||||
| @ -24,7 +26,7 @@ public class LibraryHolder extends FlexibleViewHolder { | |||||||
|     public LibraryHolder(View view, LibraryCategoryAdapter adapter, OnListItemClickListener listener) { |     public LibraryHolder(View view, LibraryCategoryAdapter adapter, OnListItemClickListener listener) { | ||||||
|         super(view, adapter, listener); |         super(view, adapter, listener); | ||||||
|         ButterKnife.bind(this, view); |         ButterKnife.bind(this, view); | ||||||
|         thumbnail.setLayoutParams(new LayoutParams(MATCH_PARENT, adapter.getCoverHeight())); |         container.setLayoutParams(new LayoutParams(MATCH_PARENT, adapter.getCoverHeight())); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void onSetValues(Manga manga, LibraryPresenter presenter) { |     public void onSetValues(Manga manga, LibraryPresenter presenter) { | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								app/src/main/res/drawable/gradient_shape.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/src/main/res/drawable/gradient_shape.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||||
|  | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|  |        android:shape="rectangle" > | ||||||
|  | 
 | ||||||
|  |     <gradient | ||||||
|  |         android:angle="90" | ||||||
|  |         android:startColor="#aa000000" | ||||||
|  |         android:centerColor="#00000000" | ||||||
|  |         android:endColor="#00ffffff"/> | ||||||
|  | 
 | ||||||
|  |     <corners android:radius="0dp" /> | ||||||
|  | </shape> | ||||||
| @ -12,13 +12,27 @@ | |||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:background="@drawable/card_background"> |         android:background="@drawable/card_background"> | ||||||
| 
 | 
 | ||||||
|         <ImageView |         <android.support.percent.PercentFrameLayout | ||||||
|             android:id="@+id/thumbnail" |             android:layout_width="wrap_content" | ||||||
|             android:layout_width="match_parent" |  | ||||||
|             android:layout_height="220dp" |             android:layout_height="220dp" | ||||||
|             android:background="@color/white" |             android:id="@+id/image_container"> | ||||||
|             tools:background="@color/md_red_100" | 
 | ||||||
|             tools:src="@mipmap/ic_launcher"/> |             <ImageView | ||||||
|  |                 android:id="@+id/thumbnail" | ||||||
|  |                 android:layout_width="match_parent" | ||||||
|  |                 android:layout_height="match_parent" | ||||||
|  |                 android:background="@color/white" | ||||||
|  |                 tools:background="@color/md_red_100" | ||||||
|  |                 tools:src="@mipmap/ic_launcher"/> | ||||||
|  | 
 | ||||||
|  |             <View | ||||||
|  |                 android:layout_width="match_parent" | ||||||
|  |                 android:layout_height="wrap_content" | ||||||
|  |                 app:layout_heightPercent="50%" | ||||||
|  |                 android:layout_gravity="bottom" | ||||||
|  |                 android:background="@drawable/gradient_shape"/> | ||||||
|  | 
 | ||||||
|  |         </android.support.percent.PercentFrameLayout> | ||||||
| 
 | 
 | ||||||
|         <TextView |         <TextView | ||||||
|             android:id="@+id/unreadText" |             android:id="@+id/unreadText" | ||||||
| @ -38,39 +52,32 @@ | |||||||
|             android:id="@+id/favorite_sticker" |             android:id="@+id/favorite_sticker" | ||||||
|             android:layout_width="wrap_content" |             android:layout_width="wrap_content" | ||||||
|             android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
|             android:layout_alignEnd="@+id/thumbnail" |             android:layout_alignEnd="@+id/image_container" | ||||||
|             android:layout_alignRight="@+id/thumbnail" |             android:layout_alignRight="@+id/image_container" | ||||||
|             android:layout_alignTop="@+id/thumbnail" |             android:layout_alignTop="@+id/image_container" | ||||||
|             android:layout_marginRight="5dp" |             android:layout_marginRight="5dp" | ||||||
|             android:layout_marginTop="5dp" |             android:layout_marginTop="5dp" | ||||||
|             android:src="@drawable/ic_action_favorite_blue" |             android:src="@drawable/ic_action_favorite_blue" | ||||||
|             android:visibility="invisible"/> |             android:visibility="invisible"/> | ||||||
| 
 | 
 | ||||||
|         <FrameLayout |         <eu.kanade.tachiyomi.widget.PTSansTextView | ||||||
|  |             android:id="@+id/title" | ||||||
|             android:layout_width="match_parent" |             android:layout_width="match_parent" | ||||||
|             android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
|             android:layout_alignBottom="@+id/thumbnail" |             android:layout_gravity="center_vertical" | ||||||
|             android:background="@color/manga_cover_title_background"> |             app:typeface="ptsansNarrowBold" | ||||||
| 
 |             android:lineSpacingExtra="-4dp" | ||||||
|             <eu.kanade.tachiyomi.widget.PTSansTextView |             android:ellipsize="end" | ||||||
|                 android:id="@+id/title" |             android:maxLines="2" | ||||||
|                 android:layout_width="match_parent" |             android:padding="8dp" | ||||||
|                 android:layout_height="wrap_content" |             android:textColor="@color/white" | ||||||
|                 android:layout_gravity="center_vertical" |             android:textSize="14sp" | ||||||
|                 app:typeface="ptsansNarrowBold" |             android:shadowDx="0" | ||||||
|                 android:lineSpacingExtra="-4dp" |             android:shadowDy="0" | ||||||
|                 android:ellipsize="end" |             android:shadowColor="@color/primary_text" | ||||||
|                 android:maxLines="2" |             android:shadowRadius="4" | ||||||
|                 android:padding="8dp" |             android:layout_alignBottom="@+id/image_container" | ||||||
|                 android:textColor="@color/white" |             tools:text="Sample name"/> | ||||||
|                 android:textSize="14sp" |  | ||||||
|                 android:shadowDx="0" |  | ||||||
|                 android:shadowDy="0" |  | ||||||
|                 android:shadowColor="@color/primary_text" |  | ||||||
|                 android:shadowRadius="4" |  | ||||||
|                 tools:text="Sample name"/> |  | ||||||
| 
 |  | ||||||
|         </FrameLayout> |  | ||||||
| 
 | 
 | ||||||
|     </RelativeLayout> |     </RelativeLayout> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -21,7 +21,5 @@ allprojects { | |||||||
|         jcenter() |         jcenter() | ||||||
|         maven { url "https://clojars.org/repo/" } |         maven { url "https://clojars.org/repo/" } | ||||||
|         maven { url "https://jitpack.io" } |         maven { url "https://jitpack.io" } | ||||||
|         maven { url 'http://dl.bintray.com/amulyakhare/maven' } |  | ||||||
|         maven { url 'https://github.com/suckgamony/RapidDecoder/raw/master/repository' } |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,9 +6,9 @@ version = '3.4.1' | |||||||
| dependencies { | dependencies { | ||||||
|     compile fileTree(dir: 'libs', include: '*.jar') |     compile fileTree(dir: 'libs', include: '*.jar') | ||||||
|     compile "com.android.support:support-annotations:23.1.1" |     compile "com.android.support:support-annotations:23.1.1" | ||||||
|     compile 'rapid.decoder:library:0.3.0' |     compile 'com.github.suckgamony.RapidDecoder:library:7cdfca4' | ||||||
|     compile 'rapid.decoder:jpeg-decoder:0.3.0' |     compile 'com.github.suckgamony.RapidDecoder:jpeg-decoder:7cdfca4' | ||||||
|     compile 'rapid.decoder:png-decoder:0.3.0' |     compile 'com.github.suckgamony.RapidDecoder:png-decoder:7cdfca4' | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| android { | android { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 inorichi
						inorichi