Merge branch 'finalize-basic-flavor' into 'master'
add Latest view to basic flavor Closes #48 See merge request fdroid/fdroidclient!723
This commit is contained in:
		
						commit
						e8ec045c55
					
				| @ -29,4 +29,9 @@ public class HidingManager { | ||||
|     public static boolean isHidden(Context context) { | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     public static void showHideDialog(final Context context) { | ||||
|         throw new IllegalStateException("unimplemented"); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -48,8 +48,11 @@ class MainViewController extends RecyclerView.ViewHolder { | ||||
|         this.frame = frame; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * @see WhatsNewViewBinder | ||||
|      */ | ||||
|     public void bindWhatsNewView() { | ||||
|         throw new IllegalStateException("unimplemented"); | ||||
|         new WhatsNewViewBinder(activity, frame); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-hdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-hdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 3.8 KiB | 
							
								
								
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-ldpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-ldpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-mdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-mdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-xhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-xhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 5.1 KiB | 
							
								
								
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-xxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-xxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 7.8 KiB | 
							
								
								
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-xxxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/basic/res/drawable-xxxhdpi/ic_launcher.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.0 KiB | 
| @ -1,6 +1,11 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <menu xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||
|     <item | ||||
|         android:title="@string/main_menu__latest_apps" | ||||
|         android:icon="@drawable/ic_latest" | ||||
|         app:showAsAction="ifRoom|withText" | ||||
|         android:id="@+id/whats_new" /> | ||||
|     <item | ||||
|         android:title="@string/updates" | ||||
|         android:icon="@drawable/ic_updates" | ||||
|  | ||||
							
								
								
									
										5
									
								
								app/src/basic/res/values/strings.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/src/basic/res/values/strings.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <resources> | ||||
|     <string name="app_name">F-Droid Basic</string> | ||||
|     <string name="about_title">About F-Droid Basic</string> | ||||
| </resources> | ||||
| @ -50,7 +50,7 @@ | ||||
|         <SwitchPreference | ||||
|                 android:title="@string/update_auto_download" | ||||
|                 android:summary="@string/update_auto_download_summary" | ||||
|                 android:defaultValue="false" | ||||
|                 android:defaultValue="true" | ||||
|                 android:key="updateAutoDownload"/> | ||||
|         <org.fdroid.fdroid.views.LiveSeekBarPreference | ||||
|                 android:key="updateIntervalSeekBarPosition" | ||||
|  | ||||
| @ -115,9 +115,10 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB | ||||
|         updatesBadge = new TextBadgeItem().hide(false); | ||||
| 
 | ||||
|         bottomNavigation = (BottomNavigationBar) findViewById(R.id.bottom_navigation); | ||||
|         bottomNavigation | ||||
|                 .addItem(new BottomNavigationItem(R.drawable.ic_latest, R.string.main_menu__latest_apps)); | ||||
|         if (BuildConfig.FLAVOR.startsWith("full")) { | ||||
|             bottomNavigation | ||||
|                     .addItem(new BottomNavigationItem(R.drawable.ic_latest, R.string.main_menu__latest_apps)) | ||||
|                     .addItem(new BottomNavigationItem(R.drawable.ic_categories, R.string.main_menu__categories)) | ||||
|                     .addItem(new BottomNavigationItem(R.drawable.ic_nearby, R.string.main_menu__swap_nearby)); | ||||
|         } | ||||
|  | ||||
| @ -10,6 +10,7 @@ import android.support.v7.widget.GridLayoutManager; | ||||
| import android.support.v7.widget.RecyclerView; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import org.fdroid.fdroid.BuildConfig; | ||||
| import org.fdroid.fdroid.R; | ||||
| import org.fdroid.fdroid.data.App; | ||||
| import org.fdroid.fdroid.views.categories.AppCardController; | ||||
| @ -57,10 +58,19 @@ public class WhatsNewAdapter extends RecyclerView.Adapter<AppCardController> { | ||||
| 
 | ||||
|     @Override | ||||
|     public int getItemViewType(int position) { | ||||
|         int relativePositionInCycle = position % 5; | ||||
| 
 | ||||
|         if (BuildConfig.FLAVOR.startsWith("basic")) { | ||||
|             if (relativePositionInCycle > 0) { | ||||
|                 return R.id.whats_new_small_tile; | ||||
|             } else { | ||||
|                 return R.id.whats_new_regular_list; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         if (position == 0) { | ||||
|             return R.id.whats_new_feature; | ||||
|         } else { | ||||
|             int relativePositionInCycle = position % 5; | ||||
|             switch (relativePositionInCycle) { | ||||
|                 case 1: | ||||
|                 case 2: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Hans-Christoph Steiner
						Hans-Christoph Steiner