mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-22 08:28:27 +00:00
Clean
This commit is contained in:
parent
8b640251b7
commit
f42e69388e
@ -1,28 +1,16 @@
|
|||||||
package org.thoughtcrime.securesms.loki.redesign
|
package org.thoughtcrime.securesms.loki.redesign
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.ActionBar
|
|
||||||
import android.view.Gravity
|
|
||||||
import android.widget.ImageView
|
|
||||||
import android.widget.RelativeLayout
|
|
||||||
import kotlinx.android.synthetic.main.activity_display_name_v2.*
|
import kotlinx.android.synthetic.main.activity_display_name_v2.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
|
import org.thoughtcrime.securesms.loki.redesign.utilities.setUpActionBarSessionLogo
|
||||||
|
|
||||||
class DisplayNameActivity : BaseActionBarActivity() {
|
class DisplayNameActivity : BaseActionBarActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
supportActionBar!!.setDisplayShowHomeEnabled(false)
|
setUpActionBarSessionLogo()
|
||||||
supportActionBar!!.setDisplayShowTitleEnabled(false)
|
|
||||||
val logoImageView = ImageView(this)
|
|
||||||
logoImageView.setImageResource(R.drawable.session_logo)
|
|
||||||
val logoImageViewContainer = RelativeLayout(this)
|
|
||||||
logoImageViewContainer.addView(logoImageView)
|
|
||||||
logoImageViewContainer.gravity = Gravity.CENTER
|
|
||||||
val logoImageViewContainerLayoutParams = ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT)
|
|
||||||
supportActionBar!!.setCustomView(logoImageViewContainer, logoImageViewContainerLayoutParams)
|
|
||||||
supportActionBar!!.setDisplayShowCustomEnabled(true)
|
|
||||||
setContentView(R.layout.activity_display_name_v2)
|
setContentView(R.layout.activity_display_name_v2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,29 +2,17 @@ package org.thoughtcrime.securesms.loki.redesign
|
|||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.ActionBar
|
|
||||||
import android.view.Gravity
|
|
||||||
import android.widget.ImageView
|
|
||||||
import android.widget.RelativeLayout
|
|
||||||
import kotlinx.android.synthetic.main.activity_landing.*
|
import kotlinx.android.synthetic.main.activity_landing.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
|
import org.thoughtcrime.securesms.loki.redesign.utilities.setUpActionBarSessionLogo
|
||||||
|
|
||||||
class LandingActivity : BaseActionBarActivity() {
|
class LandingActivity : BaseActionBarActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_landing)
|
setContentView(R.layout.activity_landing)
|
||||||
supportActionBar!!.setDisplayShowHomeEnabled(false)
|
setUpActionBarSessionLogo()
|
||||||
supportActionBar!!.setDisplayShowTitleEnabled(false)
|
|
||||||
val logoImageView = ImageView(this)
|
|
||||||
logoImageView.setImageResource(R.drawable.session_logo)
|
|
||||||
val logoImageViewContainer = RelativeLayout(this)
|
|
||||||
logoImageViewContainer.addView(logoImageView)
|
|
||||||
logoImageViewContainer.gravity = Gravity.CENTER
|
|
||||||
val logoImageViewContainerLayoutParams = ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT)
|
|
||||||
supportActionBar!!.setCustomView(logoImageViewContainer, logoImageViewContainerLayoutParams)
|
|
||||||
supportActionBar!!.setDisplayShowCustomEnabled(true)
|
|
||||||
fakeChatView.startAnimating()
|
fakeChatView.startAnimating()
|
||||||
registerButton.setOnClickListener { register() }
|
registerButton.setOnClickListener { register() }
|
||||||
restoreButton.setOnClickListener { restore() }
|
restoreButton.setOnClickListener { restore() }
|
||||||
|
@ -1,31 +1,28 @@
|
|||||||
package org.thoughtcrime.securesms.loki.redesign
|
package org.thoughtcrime.securesms.loki.redesign
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.graphics.Typeface
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.ActionBar
|
import android.text.Spannable
|
||||||
import android.view.Gravity
|
import android.text.SpannableStringBuilder
|
||||||
import android.widget.ImageView
|
import android.text.style.StyleSpan
|
||||||
import android.widget.RelativeLayout
|
|
||||||
import kotlinx.android.synthetic.main.activity_register.*
|
import kotlinx.android.synthetic.main.activity_register.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
|
import org.thoughtcrime.securesms.loki.redesign.utilities.setUpActionBarSessionLogo
|
||||||
|
|
||||||
|
|
||||||
class RegisterActivity : BaseActionBarActivity() {
|
class RegisterActivity : BaseActionBarActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_register)
|
setContentView(R.layout.activity_register)
|
||||||
supportActionBar!!.setDisplayShowHomeEnabled(false)
|
setUpActionBarSessionLogo()
|
||||||
supportActionBar!!.setDisplayShowTitleEnabled(false)
|
|
||||||
val logoImageView = ImageView(this)
|
|
||||||
logoImageView.setImageResource(R.drawable.session_logo)
|
|
||||||
val logoImageViewContainer = RelativeLayout(this)
|
|
||||||
logoImageViewContainer.addView(logoImageView)
|
|
||||||
logoImageViewContainer.gravity = Gravity.CENTER
|
|
||||||
val logoImageViewContainerLayoutParams = ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT)
|
|
||||||
supportActionBar!!.setCustomView(logoImageViewContainer, logoImageViewContainerLayoutParams)
|
|
||||||
supportActionBar!!.setDisplayShowCustomEnabled(true)
|
|
||||||
registerButton.setOnClickListener { register() }
|
registerButton.setOnClickListener { register() }
|
||||||
|
val termsExplanation = SpannableStringBuilder("By using this service, you agree to our Terms and Conditions and Privacy Statement")
|
||||||
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 40, 60, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 65, 82, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
legalButton.text = termsExplanation
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun register() {
|
private fun register() {
|
||||||
|
@ -1,29 +1,25 @@
|
|||||||
package org.thoughtcrime.securesms.loki.redesign
|
package org.thoughtcrime.securesms.loki.redesign
|
||||||
|
|
||||||
|
import android.graphics.Typeface
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.ActionBar
|
import android.text.Spannable
|
||||||
import android.view.Gravity
|
import android.text.SpannableStringBuilder
|
||||||
import android.widget.ImageView
|
import android.text.style.StyleSpan
|
||||||
import android.widget.RelativeLayout
|
|
||||||
import kotlinx.android.synthetic.main.activity_restore.*
|
import kotlinx.android.synthetic.main.activity_restore.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
|
import org.thoughtcrime.securesms.loki.redesign.utilities.setUpActionBarSessionLogo
|
||||||
|
|
||||||
class RestoreActivity : BaseActionBarActivity() {
|
class RestoreActivity : BaseActionBarActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
supportActionBar!!.setDisplayShowHomeEnabled(false)
|
setUpActionBarSessionLogo()
|
||||||
supportActionBar!!.setDisplayShowTitleEnabled(false)
|
|
||||||
val logoImageView = ImageView(this)
|
|
||||||
logoImageView.setImageResource(R.drawable.session_logo)
|
|
||||||
val logoImageViewContainer = RelativeLayout(this)
|
|
||||||
logoImageViewContainer.addView(logoImageView)
|
|
||||||
logoImageViewContainer.gravity = Gravity.CENTER
|
|
||||||
val logoImageViewContainerLayoutParams = ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT)
|
|
||||||
supportActionBar!!.setCustomView(logoImageViewContainer, logoImageViewContainerLayoutParams)
|
|
||||||
supportActionBar!!.setDisplayShowCustomEnabled(true)
|
|
||||||
setContentView(R.layout.activity_restore)
|
setContentView(R.layout.activity_restore)
|
||||||
|
val termsExplanation = SpannableStringBuilder("By using this service, you agree to our Terms and Conditions and Privacy Statement")
|
||||||
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 40, 60, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 65, 82, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
legalButton.text = termsExplanation
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
package org.thoughtcrime.securesms.loki.redesign.utilities
|
||||||
|
|
||||||
|
import android.support.v7.app.ActionBar
|
||||||
|
import android.support.v7.app.AppCompatActivity
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.widget.ImageView
|
||||||
|
import android.widget.RelativeLayout
|
||||||
|
import network.loki.messenger.R
|
||||||
|
|
||||||
|
fun AppCompatActivity.setUpActionBarSessionLogo() {
|
||||||
|
supportActionBar!!.setDisplayShowHomeEnabled(false)
|
||||||
|
supportActionBar!!.setDisplayShowTitleEnabled(false)
|
||||||
|
val logoImageView = ImageView(this)
|
||||||
|
logoImageView.setImageResource(R.drawable.session_logo)
|
||||||
|
val logoImageViewContainer = RelativeLayout(this)
|
||||||
|
logoImageViewContainer.addView(logoImageView)
|
||||||
|
logoImageViewContainer.gravity = Gravity.CENTER
|
||||||
|
val logoImageViewContainerLayoutParams = ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT)
|
||||||
|
supportActionBar!!.setCustomView(logoImageViewContainer, logoImageViewContainerLayoutParams)
|
||||||
|
supportActionBar!!.setDisplayShowCustomEnabled(true)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user