login form

This commit is contained in:
Page Asgardius 2022-09-04 12:41:02 -07:00
parent 868896b6c9
commit 22b2884162
7 changed files with 118 additions and 4 deletions

View file

@ -3,6 +3,7 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="app/src/main/res/layout/activity_account_add.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_bucket_select.xml" value="0.2" />
<entry key="app/src/main/res/layout/activity_list_item.xml" value="0.19610507246376813" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />

View file

@ -15,6 +15,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.AsgardiusS3Manager"
tools:targetApi="31">
<activity
android:name=".AccountAdd"
android:exported="false" />
<activity
android:name=".ObjectSelect"
android:exported="false" />

View file

@ -0,0 +1,14 @@
package asgardius.page.s3manager;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class AccountAdd extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_add);
}
}

View file

@ -111,10 +111,8 @@ public class MainActivity extends AppCompatActivity {
addaccount.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
System.out.println("This is not implemented yet");
//buttonaction
//s3test();
//videoplayer("https://video.asgardius.company/download/videos/41780585-a935-4d53-84c8-45ce97141231-480.mp4");
addaccount();
}
});
@ -140,4 +138,11 @@ public class MainActivity extends AppCompatActivity {
}
private void addaccount() {
Intent intent = new Intent(this, AccountAdd.class);
startActivity(intent);
}
}

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AccountAdd">
<TextView android:text = "@string/accountadd_text"
android:layout_width="match_parent"
android:layout_height="30dp"
android:id = "@+id/loginhint"
android:textSize = "25sp"
android:layout_alignParentTop = "true"
android:layout_centerHorizontal = "true"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/endpoint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="50dp"
android:focusable="true"
android:hint="@string/accountadd_endpoint"
android:importantForAutofill="no"
android:inputType="textUri"
android:textColorHighlight="#ff7eff15"
android:textColorHint="#ffff25e6"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="96dp"
android:autofillHints="username"
android:focusable="true"
android:hint="@string/accountadd_username"
android:inputType="textNoSuggestions"
android:textColorHighlight="#ff7eff15"
android:textColorHint="#ffff25e6"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="142dp"
android:autofillHints="username"
android:focusable="true"
android:hint="@string/accountadd_password"
android:inputType="textPassword"
android:textColorHighlight="#ff7eff15"
android:textColorHint="#ffff25e6"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="160dp"
android:orientation="horizontal"
android:padding="10dp"
app:layout_constraintTop_toBottomOf="@+id/loginhint"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="20dp">
<Button
android:id="@+id/addaccount"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/accountadd_button"
tools:ignore="MissingConstraints" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -12,7 +12,7 @@
android:layout_marginTop="100dp"
android:text="@string/accountselect"
android:textAlignment="center"
android:textSize="20sp"
android:textSize="25sp"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout

View file

@ -7,6 +7,10 @@
<string name="secret_key">DTMp5kftamr49Ke7</string>
<string name="accountselect">Please choose an account</string>
<string name="accountadd_button">Add Account</string>
<string name="accountadd_text">Please add your account details</string>
<string name="accountadd_endpoint">S3 Endpoint URL</string>
<string name="accountadd_username">S3 Access Key</string>
<string name="accountadd_password">S3 Secret Key</string>
<string name="explorer_test_button">File Explorer Test</string>
<string name="video_test_button">Video Test</string>
<string name="media_conn_fail">Cannot retrieve media file</string>