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 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() def versionCode = gitVersion() + (ext.configuration.buildDate.format("yyMM") + dayInYear + ext.todaysBuilds).toInteger()
println "version code " + versionCode println "version code " + versionCode
return versionCode.toInteger() return versionCode.toInteger()
} }
def versionNameFromGit() { 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 def versionName = gitVersion() + ext.configuration.buildDate.format('yyMM') + dayInYear + ext.todaysBuilds
println "version name " + versionName println "version name " + versionName
return versionName return versionName

View File

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

View File

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

View File

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

View File

@ -87,6 +87,7 @@ class MyApp : MultiDexApplication() {
private fun initTheme() { private fun initTheme() {
Scoop.waffleCone() Scoop.waffleCone()
.addFlavor(getString(R.string.default_theme), R.style.NoBar, true) .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)) .setSharedPreferences(PreferenceManager.getDefaultSharedPreferences(this))
.initialize() .initialize()
} }

View File

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

View File

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

View File

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

View File

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