Skip to content
Snippets Groups Projects
Commit 7319eb2f authored by John's avatar John
Browse files

Remove email and password auth since no longer supported

parent 6d00dbb9
No related branches found
No related tags found
No related merge requests found
Showing
with 110 additions and 199 deletions
Loading
@@ -10,6 +10,7 @@ import android.support.annotation.DrawableRes
Loading
@@ -10,6 +10,7 @@ import android.support.annotation.DrawableRes
import android.support.v4.app.ActivityOptionsCompat import android.support.v4.app.ActivityOptionsCompat
import android.view.View import android.view.View
import android.widget.ImageView import android.widget.ImageView
import com.commit451.addendum.themeAttrColor
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.R import com.commit451.gitlab.R
import com.commit451.gitlab.activity.* import com.commit451.gitlab.activity.*
Loading
@@ -87,11 +88,6 @@ object Navigator {
Loading
@@ -87,11 +88,6 @@ object Navigator {
activity.startActivity(LoginActivity.newIntent(activity, showClose)) activity.startActivity(LoginActivity.newIntent(activity, showClose))
} }
   
fun navigateToWebSignin(activity: Activity, url: String, extractingPrivateToken: Boolean, requestCode: Int) {
val intent = WebLoginActivity.newIntent(activity, url, extractingPrivateToken)
activity.startActivityForResult(intent, requestCode)
}
fun navigateToSearch(activity: Activity) { fun navigateToSearch(activity: Activity) {
activity.startActivity(SearchActivity.newIntent(activity)) activity.startActivity(SearchActivity.newIntent(activity))
} }
Loading
@@ -206,7 +202,7 @@ object Navigator {
Loading
@@ -206,7 +202,7 @@ object Navigator {
   
private fun startMorphActivity(activity: Activity, fab: View?, @DrawableRes drawableRes: Int, intent: Intent) { private fun startMorphActivity(activity: Activity, fab: View?, @DrawableRes drawableRes: Int, intent: Intent) {
if (Build.VERSION.SDK_INT >= 21 && fab != null) { if (Build.VERSION.SDK_INT >= 21 && fab != null) {
FabTransform.addExtras(intent, Easel.getThemeAttrColor(activity, R.attr.colorAccent), FabTransform.addExtras(intent, activity.themeAttrColor(R.attr.colorAccent),
drawableRes) drawableRes)
val options = ActivityOptions.makeSceneTransitionAnimation(activity, fab, activity.getString(R.string.transition_morph)) val options = ActivityOptions.makeSceneTransitionAnimation(activity, fab, activity.getString(R.string.transition_morph))
activity.startActivity(intent, options.toBundle()) activity.startActivity(intent, options.toBundle())
Loading
Loading
Loading
@@ -17,33 +17,16 @@ class CustomTrustManager : X509TrustManager {
Loading
@@ -17,33 +17,16 @@ class CustomTrustManager : X509TrustManager {
private var sslSocketFactory: SSLSocketFactory? = null private var sslSocketFactory: SSLSocketFactory? = null
private var hostnameVerifier: HostnameVerifier? = null private var hostnameVerifier: HostnameVerifier? = null
   
fun setTrustedCertificate(trustedCertificate: String?) { fun setTrustedCertificate(trustedCertificate: String) {
if (this.trustedCertificate == null && trustedCertificate == null || this.trustedCertificate != null && this.trustedCertificate == trustedCertificate) {
return
}
this.trustedCertificate = trustedCertificate this.trustedCertificate = trustedCertificate
sslSocketFactory = null sslSocketFactory = null
} }
   
fun setTrustedHostname(trustedHostname: String?) { fun setTrustedHostname(trustedHostname: String) {
if (this.trustedHostname == null && trustedHostname == null || this.trustedHostname != null && this.trustedHostname == trustedHostname) {
return
}
this.trustedHostname = trustedHostname this.trustedHostname = trustedHostname
hostnameVerifier = null hostnameVerifier = null
} }
   
fun setPrivateKeyAlias(privateKeyAlias: String?) {
if (this.privateKeyAlias == null && privateKeyAlias == null || this.privateKeyAlias != null && this.privateKeyAlias == privateKeyAlias) {
return
}
this.privateKeyAlias = privateKeyAlias
sslSocketFactory = null
}
@Throws(CertificateException::class) @Throws(CertificateException::class)
override fun checkClientTrusted(chain: Array<X509Certificate>, authType: String) { override fun checkClientTrusted(chain: Array<X509Certificate>, authType: String) {
X509TrustManagerProvider.x509TrustManager.checkClientTrusted(chain, authType) X509TrustManagerProvider.x509TrustManager.checkClientTrusted(chain, authType)
Loading
Loading
Loading
@@ -4,6 +4,7 @@ import android.content.Intent
Loading
@@ -4,6 +4,7 @@ import android.content.Intent
import android.net.Uri import android.net.Uri
import android.support.design.widget.Snackbar import android.support.design.widget.Snackbar
import android.view.View import android.view.View
import com.commit451.addendum.themeAttrColor
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.R import com.commit451.gitlab.R
import com.commit451.gitlab.activity.BaseActivity import com.commit451.gitlab.activity.BaseActivity
Loading
@@ -24,7 +25,7 @@ object IntentUtil {
Loading
@@ -24,7 +25,7 @@ object IntentUtil {
} }
val resolvedUrl = if (account == null) url else url.resolveUrl(account) val resolvedUrl = if (account == null) url else url.resolveUrl(account)
   
val primaryColor = Easel.getThemeAttrColor(activity, R.attr.colorPrimary) val primaryColor = activity.themeAttrColor(R.attr.colorPrimary)
SimpleChromeCustomTabs.getInstance() SimpleChromeCustomTabs.getInstance()
.withFallback(BrowserFallback(activity)) .withFallback(BrowserFallback(activity))
.withIntentCustomizer(LabCoatIntentCustomizer(activity, primaryColor)) .withIntentCustomizer(LabCoatIntentCustomizer(activity, primaryColor))
Loading
Loading
Loading
@@ -14,6 +14,7 @@ import android.widget.TextView
Loading
@@ -14,6 +14,7 @@ import android.widget.TextView
import butterknife.BindView import butterknife.BindView
import butterknife.ButterKnife import butterknife.ButterKnife
import butterknife.OnClick import butterknife.OnClick
import com.commit451.addendum.themeAttrColor
import com.commit451.alakazam.HideRunnable import com.commit451.alakazam.HideRunnable
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.App import com.commit451.gitlab.App
Loading
@@ -50,6 +51,7 @@ class LabCoatNavigationView : NavigationView {
Loading
@@ -50,6 +51,7 @@ class LabCoatNavigationView : NavigationView {
   
lateinit var listAccounts: RecyclerView lateinit var listAccounts: RecyclerView
lateinit var adapterAccounts: AccountAdapter lateinit var adapterAccounts: AccountAdapter
var user: User? = null
   
val mOnNavigationItemSelectedListener = OnNavigationItemSelectedListener { menuItem -> val mOnNavigationItemSelectedListener = OnNavigationItemSelectedListener { menuItem ->
when (menuItem.itemId) { when (menuItem.itemId) {
Loading
@@ -131,7 +133,9 @@ class LabCoatNavigationView : NavigationView {
Loading
@@ -131,7 +133,9 @@ class LabCoatNavigationView : NavigationView {
   
@OnClick(R.id.profile_image) @OnClick(R.id.profile_image)
fun onUserImageClick(imageView: ImageView) { fun onUserImageClick(imageView: ImageView) {
Navigator.navigateToUser(context as Activity, imageView, App.get().getAccount().user!!) user?.let {
Navigator.navigateToUser(context as Activity, imageView, it)
}
} }
   
@OnClick(R.id.button_debug) @OnClick(R.id.button_debug)
Loading
@@ -158,7 +162,7 @@ class LabCoatNavigationView : NavigationView {
Loading
@@ -158,7 +162,7 @@ class LabCoatNavigationView : NavigationView {
   
fun init() { fun init() {
App.bus().register(this) App.bus().register(this)
val colorPrimary = Easel.getThemeAttrColor(context, R.attr.colorPrimary) val colorPrimary = context.themeAttrColor(R.attr.colorPrimary)
   
setNavigationItemSelectedListener(mOnNavigationItemSelectedListener) setNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
inflateMenu(R.menu.navigation) inflateMenu(R.menu.navigation)
Loading
@@ -222,18 +226,13 @@ class LabCoatNavigationView : NavigationView {
Loading
@@ -222,18 +226,13 @@ class LabCoatNavigationView : NavigationView {
override fun responseNonNullSuccess(userFull: User) { override fun responseNonNullSuccess(userFull: User) {
//Store the newly retrieved user to the account so that it stays up to date //Store the newly retrieved user to the account so that it stays up to date
// in local storage // in local storage
val account = App.get().getAccount() this@LabCoatNavigationView.user = user
account.user = userFull
Prefs.updateAccount(account)
bindUser(userFull) bindUser(userFull)
} }
}) })
} }
   
fun bindUser(user: User) { fun bindUser(user: User) {
if (context == null) {
return
}
if (user.username != null) { if (user.username != null) {
textUserName.text = user.username textUserName.text = user.username
} }
Loading
@@ -267,7 +266,6 @@ class LabCoatNavigationView : NavigationView {
Loading
@@ -267,7 +266,6 @@ class LabCoatNavigationView : NavigationView {
account.lastUsed = Date() account.lastUsed = Date()
App.get().setAccount(account) App.get().setAccount(account)
Prefs.updateAccount(account) Prefs.updateAccount(account)
bindUser(account.user!!)
toggleAccounts() toggleAccounts()
App.bus().post(ReloadDataEvent()) App.bus().post(ReloadDataEvent())
App.bus().post(CloseDrawerEvent()) App.bus().post(CloseDrawerEvent())
Loading
Loading
Loading
@@ -3,6 +3,7 @@ package com.commit451.gitlab.view
Loading
@@ -3,6 +3,7 @@ package com.commit451.gitlab.view
import android.content.Context import android.content.Context
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.util.AttributeSet import android.util.AttributeSet
import com.commit451.addendum.themeAttrColor
   
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.R import com.commit451.gitlab.R
Loading
@@ -24,7 +25,7 @@ class LabCoatProgressView : MaterialProgressBar {
Loading
@@ -24,7 +25,7 @@ class LabCoatProgressView : MaterialProgressBar {
} }
   
private fun init() { private fun init() {
val color = Easel.getThemeAttrColor(context, R.attr.colorAccent) val color = context.themeAttrColor(R.attr.colorAccent)
progressTintList = ColorStateList.valueOf(color) progressTintList = ColorStateList.valueOf(color)
} }
} }
Loading
@@ -10,6 +10,7 @@ import android.widget.LinearLayout
Loading
@@ -10,6 +10,7 @@ import android.widget.LinearLayout
import butterknife.BindView import butterknife.BindView
import butterknife.ButterKnife import butterknife.ButterKnife
import butterknife.OnClick import butterknife.OnClick
import com.commit451.addendum.themeAttrColor
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.R import com.commit451.gitlab.R
   
Loading
@@ -58,7 +59,7 @@ class SendMessageView : LinearLayout {
Loading
@@ -58,7 +59,7 @@ class SendMessageView : LinearLayout {
View.inflate(context, R.layout.view_send_message, this) View.inflate(context, R.layout.view_send_message, this)
orientation = LinearLayout.HORIZONTAL orientation = LinearLayout.HORIZONTAL
ButterKnife.bind(this) ButterKnife.bind(this)
setBackgroundColor(Easel.getThemeAttrColor(context, R.attr.colorPrimary)) setBackgroundColor(context.themeAttrColor(R.attr.colorPrimary))
if (Build.VERSION.SDK_INT >= 21) { if (Build.VERSION.SDK_INT >= 21) {
elevation = resources.getDimensionPixelSize(R.dimen.toolbar_elevation).toFloat() elevation = resources.getDimensionPixelSize(R.dimen.toolbar_elevation).toFloat()
} }
Loading
Loading
Loading
@@ -47,7 +47,7 @@ class AccountViewHolder(view: View) : RecyclerView.ViewHolder(view) {
Loading
@@ -47,7 +47,7 @@ class AccountViewHolder(view: View) : RecyclerView.ViewHolder(view) {
   
fun bind(account: Account, isActive: Boolean, colorSelected: Int) { fun bind(account: Account, isActive: Boolean, colorSelected: Int) {
textServer.text = account.serverUrl.toString() textServer.text = account.serverUrl.toString()
textUsername.text = account.user!!.username textUsername.text = account.email
   
if (isActive) { if (isActive) {
itemView.setBackgroundColor(colorSelected) itemView.setBackgroundColor(colorSelected)
Loading
@@ -56,7 +56,7 @@ class AccountViewHolder(view: View) : RecyclerView.ViewHolder(view) {
Loading
@@ -56,7 +56,7 @@ class AccountViewHolder(view: View) : RecyclerView.ViewHolder(view) {
} }
   
App.get().picasso App.get().picasso
.load(ImageUtil.getAvatarUrl(account.user, itemView.resources.getDimensionPixelSize(R.dimen.user_list_image_size))) .load(ImageUtil.getAvatarUrl(account.email, itemView.resources.getDimensionPixelSize(R.dimen.user_list_image_size)))
.transform(CircleTransformation()) .transform(CircleTransformation())
.into(image) .into(image)
} }
Loading
Loading
Loading
@@ -7,6 +7,8 @@ import android.view.ViewGroup
Loading
@@ -7,6 +7,8 @@ import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import butterknife.BindView import butterknife.BindView
import butterknife.ButterKnife import butterknife.ButterKnife
import com.commit451.addendum.recyclerview.context
import com.commit451.addendum.themeAttrColor
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.R import com.commit451.gitlab.R
import com.commit451.gitlab.model.api.Branch import com.commit451.gitlab.model.api.Branch
Loading
@@ -31,7 +33,7 @@ class BranchViewHolder(view: View) : RecyclerView.ViewHolder(view) {
Loading
@@ -31,7 +33,7 @@ class BranchViewHolder(view: View) : RecyclerView.ViewHolder(view) {
   
init { init {
ButterKnife.bind(this, view) ButterKnife.bind(this, view)
colorHighlighted = Easel.getThemeAttrColor(itemView.context, R.attr.colorControlHighlight) colorHighlighted = context.themeAttrColor(R.attr.colorControlHighlight)
} }
   
fun bind(branch: Branch, selected: Boolean) { fun bind(branch: Branch, selected: Boolean) {
Loading
Loading
Loading
@@ -7,6 +7,8 @@ import android.view.ViewGroup
Loading
@@ -7,6 +7,8 @@ import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import butterknife.BindView import butterknife.BindView
import butterknife.ButterKnife import butterknife.ButterKnife
import com.commit451.addendum.recyclerview.context
import com.commit451.addendum.themeAttrColor
import com.commit451.easel.Easel import com.commit451.easel.Easel
import com.commit451.gitlab.R import com.commit451.gitlab.R
import com.commit451.gitlab.model.api.Tag import com.commit451.gitlab.model.api.Tag
Loading
@@ -31,7 +33,7 @@ class TagViewHolder(view: View) : RecyclerView.ViewHolder(view) {
Loading
@@ -31,7 +33,7 @@ class TagViewHolder(view: View) : RecyclerView.ViewHolder(view) {
   
init { init {
ButterKnife.bind(this, view) ButterKnife.bind(this, view)
colorHighlighted = Easel.getThemeAttrColor(itemView.context, R.attr.colorControlHighlight) colorHighlighted = context.themeAttrColor(R.attr.colorControlHighlight)
} }
   
fun bind(tag: Tag, selected: Boolean) { fun bind(tag: Tag, selected: Boolean) {
Loading
Loading
Loading
@@ -38,10 +38,10 @@ class AccountViewHolder(view: View) : TypedViewHolder<Account>(view) {
Loading
@@ -38,10 +38,10 @@ class AccountViewHolder(view: View) : TypedViewHolder<Account>(view) {
   
override fun bind(position: Int, item: Account) { override fun bind(position: Int, item: Account) {
textServer.text = item.serverUrl.toString() textServer.text = item.serverUrl.toString()
textUsername.text = item.user!!.username textUsername.text = item.email
   
Picasso.with(context) Picasso.with(context)
.load(ImageUtil.getAvatarUrl(item.user, itemView.resources.getDimensionPixelSize(R.dimen.user_list_image_size))) .load(ImageUtil.getAvatarUrl(item.email, itemView.resources.getDimensionPixelSize(R.dimen.user_list_image_size)))
.transform(CircleTransformation()) .transform(CircleTransformation())
.into(image) .into(image)
} }
Loading
Loading
Loading
@@ -27,7 +27,7 @@ import timber.log.Timber
Loading
@@ -27,7 +27,7 @@ import timber.log.Timber
/** /**
* Service that basically just defers everything to a Factory. Yay! * Service that basically just defers everything to a Factory. Yay!
*/ */
class ProjectFeedWidgetService : RemoteViewsService() { class FeedWidgetService : RemoteViewsService() {
   
companion object { companion object {
   
Loading
@@ -42,7 +42,7 @@ class ProjectFeedWidgetService : RemoteViewsService() {
Loading
@@ -42,7 +42,7 @@ class ProjectFeedWidgetService : RemoteViewsService() {
fun newIntent(context: Context, widgetId: Int, account: Account, feedUrl: String): Intent { fun newIntent(context: Context, widgetId: Int, account: Account, feedUrl: String): Intent {
val adapter = MoshiProvider.moshi.adapter<Account>(Account::class.java) val adapter = MoshiProvider.moshi.adapter<Account>(Account::class.java)
val accountJson = adapter.toJson(account) val accountJson = adapter.toJson(account)
val intent = Intent(context, ProjectFeedWidgetService::class.java) val intent = Intent(context, FeedWidgetService::class.java)
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId) intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId)
intent.putExtra(EXTRA_ACCOUNT_JSON, accountJson) intent.putExtra(EXTRA_ACCOUNT_JSON, accountJson)
intent.putExtra(EXTRA_FEED_URL, feedUrl) intent.putExtra(EXTRA_FEED_URL, feedUrl)
Loading
Loading
Loading
@@ -49,7 +49,7 @@ class ProjectFeedWidgetProvider : AppWidgetProvider() {
Loading
@@ -49,7 +49,7 @@ class ProjectFeedWidgetProvider : AppWidgetProvider() {
val account = ProjectFeedWidgetPrefs.getAccount(context, widgetId) val account = ProjectFeedWidgetPrefs.getAccount(context, widgetId)
val feedUrl = ProjectFeedWidgetPrefs.getFeedUrl(context, widgetId) val feedUrl = ProjectFeedWidgetPrefs.getFeedUrl(context, widgetId)
if (account != null && feedUrl!= null) { if (account != null && feedUrl!= null) {
val intent = ProjectFeedWidgetService.newIntent(context, widgetId, account, feedUrl) val intent = FeedWidgetService.newIntent(context, widgetId, account, feedUrl)
   
   
intent.data = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)) intent.data = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))
Loading
Loading
Loading
@@ -55,7 +55,9 @@ class UserFeedWidgetConfigureActivity : BaseActivity() {
Loading
@@ -55,7 +55,9 @@ class UserFeedWidgetConfigureActivity : BaseActivity() {
toolbar.setTitle(R.string.widget_choose_account) toolbar.setTitle(R.string.widget_choose_account)
   
adapterAccounts = AccountsAdapter() adapterAccounts = AccountsAdapter()
adapterAccounts.setOnItemClickListener { adapter, _, position -> saveWidgetConfig(adapter.get(position)) } adapterAccounts.setOnItemClickListener { adapter, _, position ->
saveWidgetConfig(adapter.get(position))
}
list.layoutManager = LinearLayoutManager(this) list.layoutManager = LinearLayoutManager(this)
list.adapter = adapterAccounts list.adapter = adapterAccounts
   
Loading
Loading
Loading
@@ -47,5 +47,4 @@ object UserFeedWidgetPrefs {
Loading
@@ -47,5 +47,4 @@ object UserFeedWidgetPrefs {
} }
   
} }
} }
Loading
@@ -24,7 +24,6 @@ import android.content.Intent
Loading
@@ -24,7 +24,6 @@ import android.content.Intent
import android.net.Uri import android.net.Uri
import android.widget.RemoteViews import android.widget.RemoteViews
import com.commit451.gitlab.R import com.commit451.gitlab.R
import com.commit451.gitlab.extension.feedUrl
import com.commit451.gitlab.navigation.DeepLinker import com.commit451.gitlab.navigation.DeepLinker
import timber.log.Timber import timber.log.Timber
   
Loading
@@ -53,13 +52,13 @@ class UserFeedWidgetProvider : AppWidgetProvider() {
Loading
@@ -53,13 +52,13 @@ class UserFeedWidgetProvider : AppWidgetProvider() {
// Here we setup the intent which points to the StackViewService which will // Here we setup the intent which points to the StackViewService which will
// provide the views for this collection. // provide the views for this collection.
val account = UserFeedWidgetPrefs.getAccount(context, widgetId) val account = UserFeedWidgetPrefs.getAccount(context, widgetId)
val feedUrl = account?.user?.feedUrl
if (account == null || feedUrl == null) { if (account == null) {
//TODO alert the user to this misfortune? //TODO alert the user to this misfortune?
Timber.e("Error getting account or feed url") Timber.e("Error getting account or feed url")
} else { } else {
Timber.d("Updating widget with url $feedUrl") val feedUrl = account.serverUrl + "/${account.username}.atom"
val intent = ProjectFeedWidgetService.newIntent(context, widgetId, account, feedUrl) val intent = FeedWidgetService.newIntent(context, widgetId, account, feedUrl)
// When intents are compared, the extras are ignored, so we need to embed the extras // When intents are compared, the extras are ignored, so we need to embed the extras
// into the data so that the extras will not be ignored. // into the data so that the extras will not be ignored.
intent.data = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)) intent.data = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))
Loading
Loading
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
</vector>
File added
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent" android:layout_width="match_parent"
Loading
@@ -10,17 +9,9 @@
Loading
@@ -10,17 +9,9 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:elevation="0dp"/> android:elevation="0dp" />
   
<ImageView <android.support.v4.widget.NestedScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="32dp"
android:contentDescription="@string/app_name"
app:srcCompat="@drawable/ic_logo"/>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
Loading
@@ -28,110 +19,88 @@
Loading
@@ -28,110 +19,88 @@
android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginRight="@dimen/activity_horizontal_margin"
android:orientation="vertical"> android:orientation="vertical">
   
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_layout_server"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/text_server"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/url_hint"
android:importantForAutofill="no"
android:inputType="textUri" />
</android.support.design.widget.TextInputLayout>
<LinearLayout <LinearLayout
android:id="@+id/normal_login"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
   
<android.support.design.widget.TextInputLayout <ImageView
android:id="@+id/user_input_hint" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content"> android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:contentDescription="@string/app_name"
app:srcCompat="@drawable/ic_logo" />
   
<android.support.design.widget.TextInputEditText <TextView
android:id="@+id/user_input" style="@style/Text.MonoRegular"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_gravity="center_horizontal"
android:hint="@string/user_hint" android:layout_marginBottom="16dp"
android:imeOptions="actionNext" android:gravity="center_horizontal"
android:inputType="textEmailAddress"/> android:text="@string/welcome"
android:textSize="32sp" />
   
</android.support.design.widget.TextInputLayout> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="@string/welcome_message" />
   
<android.support.design.widget.TextInputLayout <android.support.design.widget.TextInputLayout
android:id="@+id/password_hint" android:id="@+id/text_input_layout_server"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="8dp">
   
<android.support.design.widget.TextInputEditText <android.support.design.widget.TextInputEditText
android:id="@+id/password_input" android:id="@+id/text_server"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/user_input" android:hint="@string/url_hint"
android:layout_centerHorizontal="true" android:importantForAutofill="no"
android:hint="@string/password_hint" android:inputType="textUri" />
android:inputType="textPassword"/>
   
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
</LinearLayout>
   
<LinearLayout <LinearLayout
android:id="@+id/token_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<android.support.design.widget.TextInputLayout
android:id="@+id/token_hint"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/token_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:hint="@string/token_hint"
android:inputType="textVisiblePassword"/>
</android.support.design.widget.TextInputLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginTop="8dp"
android:text="@string/or"/> android:orientation="horizontal">
   
<Button <android.support.design.widget.TextInputLayout
android:id="@+id/button_open_login_page" android:id="@+id/token_hint"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_weight="1">
android:text="@string/open_login_page"/>
<android.support.design.widget.TextInputEditText
<TextView android:id="@+id/token_input"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_alignParentTop="true"
android:text="@string/or"/> android:layout_centerHorizontal="true"
android:hint="@string/token_hint"
android:inputType="textVisiblePassword" />
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/button_info"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@null"
android:padding="8dp"
app:srcCompat="@drawable/ic_info_outline_white_24dp" />
</LinearLayout>
   
<Button
android:id="@+id/button_open_login_page_for_personal_access"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/open_login_page_for_personal_access_token"/>
</LinearLayout> </LinearLayout>
   
</LinearLayout> </android.support.v4.widget.NestedScrollView>
   
<Button <Button
android:id="@+id/login_button" android:id="@+id/login_button"
Loading
@@ -139,8 +108,8 @@
Loading
@@ -139,8 +108,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_margin="16dp" android:layout_margin="16dp"
android:text="@string/login_button"/> android:text="@string/login_button" />
   
<include layout="@layout/progress_fullscreen"/> <include layout="@layout/progress_fullscreen" />
   
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"/>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
app:mpb_progressStyle="horizontal"/>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_advanced_login"
app:showAsAction="never"
android:title="@string/advanced_login"/>
</menu>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment