Loading app/src/main/AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -30,8 +30,7 @@ android:theme="@style/AppTheme"> <!-- <activity android:name=".application.PwaInstaller"/>--> <activity android:name=".settings.AppRequestActivity" /> <activity android:name=".MainActivity" android:configChanges="orientation|screenSize|keyboardHidden"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> Loading app/src/main/java/foundation/e/apps/categories/ApplicationsFragment.kt +12 −3 Original line number Diff line number Diff line Loading @@ -33,17 +33,17 @@ import foundation.e.apps.categories.viewmodel.CategoriesViewModel import kotlinx.android.synthetic.main.error_layout.view.* import kotlinx.android.synthetic.main.fragment_application_categories.view.* class ApplicationsFragment(color: Int?) : Fragment() { class ApplicationsFragment() : Fragment() { private lateinit var categoriesViewModel: CategoriesViewModel val color = color; var color:Int = 0; override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { categoriesViewModel = ViewModelProviders.of(activity!!).get(CategoriesViewModel::class.java) val view = inflater.inflate(R.layout.fragment_application_categories, container, false) view.categories_list.layoutManager = LinearLayoutManager(context) color = arguments!!.getInt("color",0) view.categories_list.visibility = View.GONE view.progress_bar.visibility = View.VISIBLE view.error_container.visibility = View.GONE Loading Loading @@ -85,4 +85,13 @@ class ApplicationsFragment(color: Int?) : Fragment() { } return view } companion object{ fun newInstance(color:Int?) : ApplicationsFragment{ val applicationsFragment = ApplicationsFragment() val bundle = Bundle() bundle.putInt("color",color!!) applicationsFragment.arguments = bundle return applicationsFragment } } } app/src/main/java/foundation/e/apps/categories/CategoriesViewPagerAdapter.kt +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ import androidx.fragment.app.FragmentStatePagerAdapter class CategoriesViewPagerAdapter(fragmentManager: FragmentManager, private val numberOfTabs: Int, color: Int?) : FragmentStatePagerAdapter(fragmentManager) { private val applicationsFragment = ApplicationsFragment(color) private val gamesFragment = GamesFragment(color) private val applicationsFragment = ApplicationsFragment.newInstance(color) private val gamesFragment = GamesFragment.newInstance(color) private val pwasFragment = PwasFragment() Loading app/src/main/java/foundation/e/apps/categories/GamesFragment.kt +13 −3 Original line number Diff line number Diff line Loading @@ -32,17 +32,17 @@ import foundation.e.apps.categories.viewmodel.CategoriesViewModel import kotlinx.android.synthetic.main.error_layout.view.* import kotlinx.android.synthetic.main.fragment_games_categories.view.* class GamesFragment(color: Int?) : Fragment() { class GamesFragment() : Fragment() { private lateinit var categoriesViewModel: CategoriesViewModel var color=color; var color:Int = 0; override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { categoriesViewModel = ViewModelProviders.of(activity!!).get(CategoriesViewModel::class.java) val view = inflater.inflate(R.layout.fragment_games_categories, container, false) view.categories_list.layoutManager = LinearLayoutManager(context) color = arguments!!.getInt("color",0) view.categories_list.visibility = View.GONE view.progress_bar.visibility = View.VISIBLE view.error_container.visibility = View.GONE Loading Loading @@ -81,4 +81,14 @@ class GamesFragment(color: Int?) : Fragment() { } return view } companion object{ fun newInstance(color:Int?) : GamesFragment{ val gamesFragment = GamesFragment() val bundle = Bundle() bundle.putInt("color",color!!) gamesFragment.arguments = bundle return gamesFragment } } } app/src/main/java/foundation/e/apps/updates/UpdatesFragment.kt +2 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ class UpdatesFragment() : Fragment() { private lateinit var recyclerView: RecyclerView private var applicationList = ArrayList<Application>() var accentColorOS=0; lateinit var progressBar2:ProgressBar fun initialise(applicationManager: ApplicationManager, accentColorOS: Int) { this.applicationManager = applicationManager Loading @@ -65,6 +66,7 @@ class UpdatesFragment() : Fragment() { updatesViewModel = ViewModelProviders.of(activity!!).get(UpdatesViewModel::class.java) recyclerView = view.findViewById(R.id.app_list) progressBar2 = view.findViewById<ProgressBar>(R.id.progress_bar2) val updateAll = view.findViewById<Button>(R.id.update_all) updateAll.setTextColor(accentColorOS) val splashContainer = view.findViewById<LinearLayout>(R.id.splash_container) Loading Loading @@ -154,7 +156,6 @@ class UpdatesFragment() : Fragment() { override fun onResume() { super.onResume() val progressBar2 = view!!.findViewById<ProgressBar>(R.id.progress_bar2) if (::updatesViewModel.isInitialized) { updatesViewModel.getApplications().value?.let { it.forEach { application -> Loading Loading
app/src/main/AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -30,8 +30,7 @@ android:theme="@style/AppTheme"> <!-- <activity android:name=".application.PwaInstaller"/>--> <activity android:name=".settings.AppRequestActivity" /> <activity android:name=".MainActivity" android:configChanges="orientation|screenSize|keyboardHidden"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> Loading
app/src/main/java/foundation/e/apps/categories/ApplicationsFragment.kt +12 −3 Original line number Diff line number Diff line Loading @@ -33,17 +33,17 @@ import foundation.e.apps.categories.viewmodel.CategoriesViewModel import kotlinx.android.synthetic.main.error_layout.view.* import kotlinx.android.synthetic.main.fragment_application_categories.view.* class ApplicationsFragment(color: Int?) : Fragment() { class ApplicationsFragment() : Fragment() { private lateinit var categoriesViewModel: CategoriesViewModel val color = color; var color:Int = 0; override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { categoriesViewModel = ViewModelProviders.of(activity!!).get(CategoriesViewModel::class.java) val view = inflater.inflate(R.layout.fragment_application_categories, container, false) view.categories_list.layoutManager = LinearLayoutManager(context) color = arguments!!.getInt("color",0) view.categories_list.visibility = View.GONE view.progress_bar.visibility = View.VISIBLE view.error_container.visibility = View.GONE Loading Loading @@ -85,4 +85,13 @@ class ApplicationsFragment(color: Int?) : Fragment() { } return view } companion object{ fun newInstance(color:Int?) : ApplicationsFragment{ val applicationsFragment = ApplicationsFragment() val bundle = Bundle() bundle.putInt("color",color!!) applicationsFragment.arguments = bundle return applicationsFragment } } }
app/src/main/java/foundation/e/apps/categories/CategoriesViewPagerAdapter.kt +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ import androidx.fragment.app.FragmentStatePagerAdapter class CategoriesViewPagerAdapter(fragmentManager: FragmentManager, private val numberOfTabs: Int, color: Int?) : FragmentStatePagerAdapter(fragmentManager) { private val applicationsFragment = ApplicationsFragment(color) private val gamesFragment = GamesFragment(color) private val applicationsFragment = ApplicationsFragment.newInstance(color) private val gamesFragment = GamesFragment.newInstance(color) private val pwasFragment = PwasFragment() Loading
app/src/main/java/foundation/e/apps/categories/GamesFragment.kt +13 −3 Original line number Diff line number Diff line Loading @@ -32,17 +32,17 @@ import foundation.e.apps.categories.viewmodel.CategoriesViewModel import kotlinx.android.synthetic.main.error_layout.view.* import kotlinx.android.synthetic.main.fragment_games_categories.view.* class GamesFragment(color: Int?) : Fragment() { class GamesFragment() : Fragment() { private lateinit var categoriesViewModel: CategoriesViewModel var color=color; var color:Int = 0; override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { categoriesViewModel = ViewModelProviders.of(activity!!).get(CategoriesViewModel::class.java) val view = inflater.inflate(R.layout.fragment_games_categories, container, false) view.categories_list.layoutManager = LinearLayoutManager(context) color = arguments!!.getInt("color",0) view.categories_list.visibility = View.GONE view.progress_bar.visibility = View.VISIBLE view.error_container.visibility = View.GONE Loading Loading @@ -81,4 +81,14 @@ class GamesFragment(color: Int?) : Fragment() { } return view } companion object{ fun newInstance(color:Int?) : GamesFragment{ val gamesFragment = GamesFragment() val bundle = Bundle() bundle.putInt("color",color!!) gamesFragment.arguments = bundle return gamesFragment } } }
app/src/main/java/foundation/e/apps/updates/UpdatesFragment.kt +2 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ class UpdatesFragment() : Fragment() { private lateinit var recyclerView: RecyclerView private var applicationList = ArrayList<Application>() var accentColorOS=0; lateinit var progressBar2:ProgressBar fun initialise(applicationManager: ApplicationManager, accentColorOS: Int) { this.applicationManager = applicationManager Loading @@ -65,6 +66,7 @@ class UpdatesFragment() : Fragment() { updatesViewModel = ViewModelProviders.of(activity!!).get(UpdatesViewModel::class.java) recyclerView = view.findViewById(R.id.app_list) progressBar2 = view.findViewById<ProgressBar>(R.id.progress_bar2) val updateAll = view.findViewById<Button>(R.id.update_all) updateAll.setTextColor(accentColorOS) val splashContainer = view.findViewById<LinearLayout>(R.id.splash_container) Loading Loading @@ -154,7 +156,6 @@ class UpdatesFragment() : Fragment() { override fun onResume() { super.onResume() val progressBar2 = view!!.findViewById<ProgressBar>(R.id.progress_bar2) if (::updatesViewModel.isInitialized) { updatesViewModel.getApplications().value?.let { it.forEach { application -> Loading