Versions update and fixes.

This commit is contained in:
Amine 2017-07-02 08:19:07 +02:00
parent 044585ee9b
commit d04cbac79c
13 changed files with 75 additions and 75 deletions

View File

@ -19,8 +19,8 @@ repositories {
} }
android { android {
compileSdkVersion 25 compileSdkVersion 26
buildToolsVersion "25.0.3" buildToolsVersion "26.0.0"
defaultConfig { defaultConfig {
applicationId "apps.amine.bou.readerforselfoss" applicationId "apps.amine.bou.readerforselfoss"
minSdkVersion 16 minSdkVersion 16
@ -80,19 +80,19 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
// Android Support // Android Support
compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:appcompat-v7:26.0.0-beta2'
compile 'com.android.support:design:25.3.1' compile 'com.android.support:design:26.0.0-beta2'
compile 'com.android.support:recyclerview-v7:25.3.1' compile 'com.android.support:recyclerview-v7:26.0.0-beta2'
compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:support-v4:26.0.0-beta2'
compile 'com.android.support:support-vector-drawable:25.3.1' compile 'com.android.support:support-vector-drawable:26.0.0-beta2'
compile 'com.android.support:customtabs:25.3.1' compile 'com.android.support:customtabs:26.0.0-beta2'
compile 'com.android.support:cardview-v7:25.3.1' compile 'com.android.support:cardview-v7:26.0.0-beta2'
compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support.constraint:constraint-layout:1.0.2'
// Firebase + crashlytics // Firebase + crashlytics
compile 'com.google.firebase:firebase-core:10.2.6' compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-config:10.2.6' compile 'com.google.firebase:firebase-config:11.0.1'
compile 'com.google.firebase:firebase-invites:10.2.6' compile 'com.google.firebase:firebase-invites:11.0.1'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true transitive = true
} }
@ -128,10 +128,10 @@ dependencies {
compile 'com.github.stkent:amplify:1.5.0' compile 'com.github.stkent:amplify:1.5.0'
// For the article reader // For the article reader
compile 'com.klinkerapps:drag-dismiss-activity:1.4.0' compile 'com.klinkerapps:drag-dismiss-activity:1.4.1'
// Drawer // Drawer
compile('com.mikepenz:materialdrawer:5.9.2@aar') { compile('com.mikepenz:materialdrawer:5.9.3@aar') {
transitive = true transitive = true
} }
compile 'com.anupcowkur:reservoir:3.1.0' compile 'com.anupcowkur:reservoir:3.1.0'

View File

@ -27,13 +27,13 @@ class AddSourceActivity : AppCompatActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_add_source) setContentView(R.layout.activity_add_source)
val mProgress = findViewById(R.id.progress) as ProgressBar val mProgress: ProgressBar = findViewById(R.id.progress)
val mForm = findViewById(R.id.formContainer) as ConstraintLayout val mForm: ConstraintLayout = findViewById(R.id.formContainer)
val mNameInput = findViewById(R.id.nameInput) as EditText val mNameInput: EditText = findViewById(R.id.nameInput)
val mSourceUri = findViewById(R.id.sourceUri) as EditText val mSourceUri: EditText = findViewById(R.id.sourceUri)
val mTags = findViewById(R.id.tags) as EditText val mTags: EditText = findViewById(R.id.tags)
val mSpoutsSpinner = findViewById(R.id.spoutsSpinner) as Spinner val mSpoutsSpinner: Spinner = findViewById(R.id.spoutsSpinner)
val mSaveBtn = findViewById(R.id.saveBtn) as Button val mSaveBtn: Button = findViewById(R.id.saveBtn)
var api: SelfossApi? = null var api: SelfossApi? = null
try { try {

View File

@ -116,11 +116,11 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home) setContentView(R.layout.activity_home)
toolbar = findViewById(R.id.toolbar) as Toolbar toolbar = findViewById(R.id.toolbar)
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
if (savedInstanceState == null) { if (savedInstanceState == null) {
val promptView = findViewById(R.id.prompt_view) as DefaultLayoutPromptView val promptView: DefaultLayoutPromptView = findViewById(R.id.prompt_view)
Amplify.getSharedInstance().promptIfReady(promptView) Amplify.getSharedInstance().promptIfReady(promptView)
} }
@ -132,7 +132,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
api = SelfossApi(this, this@HomeActivity) api = SelfossApi(this, this@HomeActivity)
items = ArrayList() items = ArrayList()
mBottomBar = findViewById(R.id.bottomBar) as BottomBar mBottomBar = findViewById(R.id.bottomBar)
handleDrawer() handleDrawer()
@ -153,9 +153,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
} }
} }
mCoordinatorLayout = findViewById(R.id.coordLayout) as CoordinatorLayout mCoordinatorLayout = findViewById(R.id.coordLayout)
mSwipeRefreshLayout = findViewById(R.id.swipeRefreshLayout) as SwipeRefreshLayout mSwipeRefreshLayout = findViewById(R.id.swipeRefreshLayout)
mRecyclerView = findViewById(R.id.my_recycler_view) as RecyclerView mRecyclerView = findViewById(R.id.my_recycler_view)
reloadLayoutManager() reloadLayoutManager()

View File

@ -76,21 +76,21 @@ class LoginActivity : AppCompatActivity() {
} }
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this) mFirebaseAnalytics = FirebaseAnalytics.getInstance(this)
mUrlView = findViewById(R.id.url) as EditText mUrlView = findViewById(R.id.url)
mLoginView = findViewById(R.id.login) as TextView mLoginView = findViewById(R.id.login)
mHTTPLoginView = findViewById(R.id.httpLogin) as TextView mHTTPLoginView = findViewById(R.id.httpLogin)
mPasswordView = findViewById(R.id.password) as EditText mPasswordView = findViewById(R.id.password)
mHTTPPasswordView = findViewById(R.id.httpPassword) as EditText mHTTPPasswordView = findViewById(R.id.httpPassword)
mLoginFormView = findViewById(R.id.login_form) mLoginFormView = findViewById(R.id.login_form)
mProgressView = findViewById(R.id.login_progress) mProgressView = findViewById(R.id.login_progress)
val mSwitch = findViewById(R.id.withLogin) as Switch val mSwitch: Switch = findViewById(R.id.withLogin)
val mHTTPSwitch = findViewById(R.id.withHttpLogin) as Switch val mHTTPSwitch: Switch = findViewById(R.id.withHttpLogin)
val mLoginLayout = findViewById(R.id.loginLayout) as TextInputLayout val mLoginLayout: TextInputLayout = findViewById(R.id.loginLayout)
val mHTTPLoginLayout = findViewById(R.id.httpLoginInput) as TextInputLayout val mHTTPLoginLayout: TextInputLayout = findViewById(R.id.httpLoginInput)
val mPasswordLayout = findViewById(R.id.passwordLayout) as TextInputLayout val mPasswordLayout: TextInputLayout = findViewById(R.id.passwordLayout)
val mHTTPPasswordLayout = findViewById(R.id.httpPasswordInput) as TextInputLayout val mHTTPPasswordLayout: TextInputLayout = findViewById(R.id.httpPasswordInput)
val mEmailSignInButton = findViewById(R.id.email_sign_in_button) as Button val mEmailSignInButton: Button = findViewById(R.id.email_sign_in_button)
mPasswordView.setOnEditorActionListener(TextView.OnEditorActionListener { _, id, _ -> mPasswordView.setOnEditorActionListener(TextView.OnEditorActionListener { _, id, _ ->
if (id == R.id.login || id == EditorInfo.IME_NULL) { if (id == R.id.login || id == EditorInfo.IME_NULL) {

View File

@ -42,14 +42,14 @@ class ReaderActivity : DragDismissActivity() {
val v = inflater.inflate(R.layout.activity_reader, parent, false) val v = inflater.inflate(R.layout.activity_reader, parent, false)
showProgressBar() showProgressBar()
val image = v.findViewById(R.id.imageView) as ImageView val image: ImageView = v.findViewById(R.id.imageView)
val source = v.findViewById(R.id.source) as TextView val source: TextView = v.findViewById(R.id.source)
val title = v.findViewById(R.id.title) as TextView val title: TextView = v.findViewById(R.id.title)
val content = v.findViewById(R.id.content) as HtmlTextView val content: HtmlTextView = v.findViewById(R.id.content)
val url = intent.getStringExtra("url") val url = intent.getStringExtra("url")
val parser = MercuryApi(getString(R.string.mercury)) val parser = MercuryApi(getString(R.string.mercury))
val browserBtn: ImageButton = v.findViewById(R.id.browserBtn) as ImageButton val browserBtn: ImageButton = v.findViewById(R.id.browserBtn)
val shareBtn: ImageButton = v.findViewById(R.id.shareBtn) as ImageButton val shareBtn: ImageButton = v.findViewById(R.id.shareBtn)
val customTabsIntent = this@ReaderActivity.buildCustomTabsIntent() val customTabsIntent = this@ReaderActivity.buildCustomTabsIntent()

View File

@ -27,8 +27,8 @@ class SourcesActivity : AppCompatActivity() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
val mFab = findViewById(R.id.fab) as FloatingActionButton val mFab: FloatingActionButton = findViewById(R.id.fab)
val mRecyclerView = findViewById(R.id.activity_sources) as RecyclerView val mRecyclerView: RecyclerView = findViewById(R.id.activity_sources)
val mLayoutManager = LinearLayoutManager(this) val mLayoutManager = LinearLayoutManager(this)
val api = SelfossApi(this, this@SourcesActivity) val api = SelfossApi(this, this@SourcesActivity)
var items: ArrayList<Sources> = ArrayList() var items: ArrayList<Sources> = ArrayList()

View File

@ -113,7 +113,7 @@ class ItemCardAdapter(private val app: Activity,
} }
val view = s.view val view = s.view
val tv = view.findViewById(android.support.design.R.id.snackbar_text) as TextView val tv: TextView = view.findViewById(android.support.design.R.id.snackbar_text)
tv.setTextColor(Color.WHITE) tv.setTextColor(Color.WHITE)
s.show() s.show()
} }
@ -155,13 +155,13 @@ class ItemCardAdapter(private val app: Activity,
} }
private fun handleClickListeners() { private fun handleClickListeners() {
sourceImage = mView.findViewById(R.id.sourceImage) as ImageView sourceImage = mView.findViewById(R.id.sourceImage)
itemImage = mView.findViewById(R.id.itemImage) as ImageView itemImage = mView.findViewById(R.id.itemImage)
title = mView.findViewById(R.id.title) as TextView title = mView.findViewById(R.id.title)
sourceTitleAndDate = mView.findViewById(R.id.sourceTitleAndDate) as TextView sourceTitleAndDate = mView.findViewById(R.id.sourceTitleAndDate)
saveBtn = mView.findViewById(R.id.favButton) as LikeButton saveBtn = mView.findViewById(R.id.favButton)
shareBtn = mView.findViewById(R.id.shareBtn) as ImageButton shareBtn = mView.findViewById(R.id.shareBtn)
browserBtn = mView.findViewById(R.id.browserBtn) as ImageButton browserBtn = mView.findViewById(R.id.browserBtn)
if (!fullHeightCards) { if (!fullHeightCards) {
itemImage.maxHeight = c.resources.getDimension(R.dimen.card_image_max_height).toInt() itemImage.maxHeight = c.resources.getDimension(R.dimen.card_image_max_height).toInt()

View File

@ -127,7 +127,7 @@ class ItemListAdapter(private val app: Activity,
} }
val view = s.view val view = s.view
val tv = view.findViewById(android.support.design.R.id.snackbar_text) as TextView val tv: TextView = view.findViewById(android.support.design.R.id.snackbar_text)
tv.setTextColor(Color.WHITE) tv.setTextColor(Color.WHITE)
s.show() s.show()
} }
@ -169,13 +169,13 @@ class ItemListAdapter(private val app: Activity,
} }
private fun handleClickListeners() { private fun handleClickListeners() {
actionBar = mView.findViewById(R.id.actionBar) as RelativeLayout actionBar = mView.findViewById(R.id.actionBar)
sourceImage = mView.findViewById(R.id.itemImage) as ImageView sourceImage = mView.findViewById(R.id.itemImage)
title = mView.findViewById(R.id.title) as TextView title = mView.findViewById(R.id.title)
sourceTitleAndDate = mView.findViewById(R.id.sourceTitleAndDate) as TextView sourceTitleAndDate = mView.findViewById(R.id.sourceTitleAndDate)
saveBtn = mView.findViewById(R.id.favButton) as LikeButton saveBtn = mView.findViewById(R.id.favButton)
shareBtn = mView.findViewById(R.id.shareBtn) as ImageButton shareBtn = mView.findViewById(R.id.shareBtn)
browserBtn = mView.findViewById(R.id.browserBtn) as ImageButton browserBtn = mView.findViewById(R.id.browserBtn)
saveBtn.setOnLikeListener(object : OnLikeListener { saveBtn.setOnLikeListener(object : OnLikeListener {

View File

@ -69,10 +69,10 @@ class SourcesListAdapter(private val app: Activity,
} }
private fun handleClickListeners() { private fun handleClickListeners() {
sourceImage = mView.findViewById(R.id.itemImage) as ImageView sourceImage = mView.findViewById(R.id.itemImage)
sourceTitle = mView.findViewById(R.id.sourceTitle) as TextView sourceTitle = mView.findViewById(R.id.sourceTitle)
val deleteBtn = mView.findViewById(R.id.deleteBtn) as Button val deleteBtn: Button = mView.findViewById(R.id.deleteBtn)
deleteBtn.setOnClickListener { deleteBtn.setOnClickListener {
val (id) = items[adapterPosition] val (id) = items[adapterPosition]

View File

@ -11,7 +11,7 @@ import apps.amine.bou.readerforselfoss.R
open class CustomBaseViewHolder(var view: View) : RecyclerView.ViewHolder(view) { open class CustomBaseViewHolder(var view: View) : RecyclerView.ViewHolder(view) {
var icon: ImageView = view.findViewById(R.id.material_drawer_icon) as ImageView var icon: ImageView = view.findViewById(R.id.material_drawer_icon)
var name: TextView = view.findViewById(R.id.material_drawer_name) as TextView var name: TextView = view.findViewById(R.id.material_drawer_name)
var description: TextView = view.findViewById(R.id.material_drawer_description) as TextView var description: TextView = view.findViewById(R.id.material_drawer_description)
} }

View File

@ -88,7 +88,7 @@ class CustomUrlPrimaryDrawerItem : CustomUrlBasePrimaryDrawerItem<CustomUrlPrima
class ViewHolder(view: View) : CustomBaseViewHolder(view) { class ViewHolder(view: View) : CustomBaseViewHolder(view) {
val badgeContainer: View = view.findViewById(R.id.material_drawer_badge_container) val badgeContainer: View = view.findViewById(R.id.material_drawer_badge_container)
val badge: TextView = view.findViewById(R.id.material_drawer_badge) as TextView val badge: TextView = view.findViewById(R.id.material_drawer_badge)
} }
} }

View File

@ -1,18 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.1.2-5' ext.kotlin_version = '1.1.3'
repositories { repositories {
maven { url 'https://maven.google.com' } maven { url 'https://maven.google.com' }
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4' classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0' classpath 'com.google.gms:google-services:3.1.0'
} }
} }

View File

@ -1,6 +1,6 @@
#Sun Jun 18 08:29:00 CEST 2017 #Sun Jul 02 08:13:37 CEST 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-rc-1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip