Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1fb3470 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer Committed by Sumit Pundir
Browse files

update user interface custom url

parent ca5f0626
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
package foundation.e.accountmanager.ui.setup

import android.app.AlertDialog
import android.content.Context
import android.net.MailTo
import android.os.*
@@ -10,8 +9,6 @@ import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import android.net.Uri
import android.widget.EditText
import android.widget.LinearLayout
import android.net.ConnectivityManager

import foundation.e.accountmanager.R
@@ -56,7 +53,7 @@ class EeloAuthenticatorFragment : Fragment() {
        v.lifecycleOwner = this
        v.model = model

	v.root.expand_collapse_button.setOnClickListener() { expandCollapse() }
	v.root.urlpwd_other_account_title_panel.setOnClickListener() { expandCollapse() }

	v.login.setOnClickListener { login() }

@@ -66,6 +63,7 @@ class EeloAuthenticatorFragment : Fragment() {
            toggleButtonState = savedInstanceState.getBoolean(TOGGLE_BUTTON_CHECKED_KEY, false)
        }
	
	//This allow the button to be redraw in the correct state if user turn screen
        if(toggleButtonState == true) {
            v.root.expand_collapse_button.setChecked(toggleButtonState)
            v.root.urlpwd_server_uri_layout.setVisibility(View.VISIBLE)
@@ -150,6 +148,9 @@ class EeloAuthenticatorFragment : Fragment() {
     * Show/Hide panel containing server's uri input field.
     */
    private fun expandCollapse(){
	//inverse state of Toggle button
        expand_collapse_button.setChecked(!expand_collapse_button.isChecked())

        if(expand_collapse_button.isChecked) {
            urlpwd_server_uri_layout.setVisibility(View.VISIBLE)
            urlpwd_server_uri.setEnabled(true)
+4 −2
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@
                android:id="@+id/urlpwd_other_account_title_panel"
                android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:clickable="true"
                android:orientation="horizontal">

                <TextView
@@ -118,7 +119,8 @@
                    android:button="@drawable/custom_url_button_value"
                    android:text=""
                    android:textOff=""
                    android:textOn="" />
		    android:textOn="" 
		    android:clickable="false"/>	
            	
		</LinearLayout>
            	<!--android:checked="false"-->