Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48e7cbbb authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Revert some changes, improve data binding, create new ViewModels, Models and interfaces

parent c74a046c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ android {
}

dependencies {
    def lifecycle_version = "1.1.1"
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
@@ -33,6 +34,7 @@ dependencies {
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:preference-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation "android.arch.lifecycle:extensions:$lifecycle_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+8 −6
Original line number Diff line number Diff line
@@ -16,22 +16,23 @@ import io.eelo.appinstaller.updates.UpdatesFragment
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemSelectedListener {
    private val settings = Settings()
    private var currentFragment: Fragment? = null
    private val homeFragment = HomeFragment()
    private val categoriesFragment = CategoriesFragment()
    private val searchFragment = SearchFragment.newInstance(settings)
    private val searchFragment = SearchFragment()
    private val updatesFragment = UpdatesFragment()
    private val settingsFragment = SettingsFragment()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        settings.context = applicationContext
        settings.serverPath = ""
        settings.APKsFolder = ""
        settings.resultsPerPage = 10

        // Show the home fragment by default
        showFragment(homeFragment)

        bottom_navigation_view.setOnNavigationItemSelectedListener(this)

        // Disable shifting of nav bar items
        removeShiftMode(bottom_navigation_view)
    }

@@ -66,6 +67,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
                .beginTransaction()
                .replace(R.id.frame_layout, fragment)
                .commit()
        currentFragment = fragment
    }

    @SuppressLint("RestrictedApi")
+4 −0
Original line number Diff line number Diff line
package io.eelo.appinstaller.categories

class CategoriesModel : CategoriesModelInterface {
}
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
package io.eelo.appinstaller.categories

interface CategoriesModelInterface {
}
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
package io.eelo.appinstaller.categories

class CategoriesViewModel : CategoriesViewModelInterface {
}
 No newline at end of file
Loading