Version names.

This commit is contained in:
Amine Bou 2018-04-15 15:46:42 +02:00
parent 487d484bae
commit a929e419d9
9 changed files with 20 additions and 13 deletions

View File

@ -22,14 +22,14 @@ def gitVersion() {
}
def versionCodeFromGit() {
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0').substring(1, 2)
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0').substring(1, 3)
def versionCode = gitVersion() + (ext.configuration.buildDate.format("yyMM") + dayInYear + ext.todaysBuilds).toInteger()
println "version code " + versionCode
return versionCode.toInteger()
}
def versionNameFromGit() {
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0').substring(1, 2)
def dayInYear = ext.configuration.buildDate.format("D").padLeft(3, '0').substring(1, 3)
def versionName = gitVersion() + ext.configuration.buildDate.format('yyMM') + dayInYear + ext.todaysBuilds
println "version name " + versionName
return versionName

View File

@ -38,10 +38,10 @@ class AddSourceActivity : AppCompatActivity() {
private lateinit var appColors: AppColors
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
appColors = AppColors(this@AddSourceActivity)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_add_source)
// TODO: input bubble cursor

View File

@ -144,10 +144,10 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
appColors = AppColors(this@HomeActivity)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)
handleThemeBinding()

View File

@ -44,10 +44,10 @@ class LoginActivity : AppCompatActivity() {
private lateinit var appColors: AppColors
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
appColors = AppColors(this@LoginActivity)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_login)
setSupportActionBar(toolbar)

View File

@ -87,6 +87,7 @@ class MyApp : MultiDexApplication() {
private fun initTheme() {
Scoop.waffleCone()
.addFlavor(getString(R.string.default_theme), R.style.NoBar, true)
.addFlavor(getString(R.string.default_dark_theme), R.style.NoBarDark, false)
.setSharedPreferences(PreferenceManager.getDefaultSharedPreferences(this))
.initialize()
}

View File

@ -1,6 +1,7 @@
package apps.amine.bou.readerforselfoss
import android.content.Context
import android.content.res.Resources
import android.os.Bundle
import android.preference.PreferenceManager
import android.support.v4.app.FragmentManager
@ -53,9 +54,10 @@ class ReaderActivity : AppCompatActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
val appColors = AppColors(this@ReaderActivity)
super.onCreate(savedInstanceState)
val appColors = AppColors(this@ReaderActivity)
setContentView(R.layout.activity_reader)
Scoop.getInstance()

View File

@ -23,10 +23,10 @@ class SourcesActivity : AppCompatActivity() {
private lateinit var appColors: AppColors
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
appColors = AppColors(this@SourcesActivity)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_sources)
Scoop.getInstance()

View File

@ -66,9 +66,10 @@ class ArticleFragment : Fragment() {
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
appColors = AppColors(activity!!)
super.onCreate(savedInstanceState)
pageNumber = arguments!!.getInt(ARG_POSITION)
allItems = arguments!!.getParcelableArrayList(ARG_ITEMS)
}
@ -446,4 +447,6 @@ class ArticleFragment : Fragment() {
return fragment
}
}
}

View File

@ -33,9 +33,10 @@ public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
new AppColors(this);
getDelegate().installViewFactory();
getDelegate().onCreate(savedInstanceState);
new AppColors(this);
super.onCreate(savedInstanceState);
}