Skip to content

Commit

Permalink
Modularize preferred screen
Browse files Browse the repository at this point in the history
  • Loading branch information
tasomaniac committed Mar 17, 2019
1 parent d9591fa commit f4700ed
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ dependencies {
implementation project(':data')
implementation project(':homescreen')
implementation project(':intro')
implementation project(':preferred-apps')
implementation project(':redirect')
implementation project(':resolver')

Expand Down
6 changes: 6 additions & 0 deletions preferred-apps/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apply from: configFile('android-library-config.gradle')

dependencies {
implementation project(':resolver')
implementation project(':data')
}
6 changes: 6 additions & 0 deletions preferred-apps/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tasomaniac.openwith.preferred">

<application android:supportsRtl="true" />

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatDialogFragment
import androidx.core.os.bundleOf
import androidx.core.text.parseAsHtml
import com.tasomaniac.openwith.R
import com.tasomaniac.openwith.resolver.DisplayActivityInfo

class AppRemoveDialogFragment : AppCompatDialogFragment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.tasomaniac.openwith.HeaderAdapter
import com.tasomaniac.openwith.R
import com.tasomaniac.openwith.SimpleTextViewHolder
import com.tasomaniac.openwith.data.Analytics
import com.tasomaniac.openwith.data.PreferredApp
Expand All @@ -22,9 +21,7 @@ import dagger.android.support.DaggerAppCompatActivity
import io.reactivex.Completable
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.addTo
import kotlinx.android.synthetic.main.activity_preferred_apps.toolbar
import javax.inject.Inject
import kotlinx.android.synthetic.main.activity_preferred_apps.recycler_view as recyclerView

class PreferredAppsActivity : DaggerAppCompatActivity(), ItemClickListener, AppRemoveDialogFragment.Callbacks {

Expand All @@ -36,11 +33,13 @@ class PreferredAppsActivity : DaggerAppCompatActivity(), ItemClickListener, AppR

private val disposables = CompositeDisposable()

private val recyclerView by lazy { findViewById<RecyclerView>(R.id.recycler_view) }

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_preferred_apps)

setSupportActionBar(toolbar)
setSupportActionBar(findViewById(R.id.toolbar))
supportActionBar!!.setDisplayHomeAsUpEnabled(true)

recyclerView.layoutManager = LinearLayoutManager(this)
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include ':data'
include ':homescreen'
include ':intro'
include ':intro-lib'
include ':preferred-apps'
include ':redirect'
include ':resolver'
include ':test-support'

0 comments on commit f4700ed

Please sign in to comment.