interface fix

This commit is contained in:
Page Asgardius 2022-09-10 07:50:20 -07:00
parent 4b2f5c95cd
commit 7fef360ced
8 changed files with 26 additions and 40 deletions

View file

@ -112,13 +112,13 @@ public class BucketSelect extends AppCompatActivity {
recyclerView.addOnItemTouchListener(new RecyclerTouchListener(getApplicationContext(), recyclerView, new RecyclerTouchListener.ClickListener() { recyclerView.addOnItemTouchListener(new RecyclerTouchListener(getApplicationContext(), recyclerView, new RecyclerTouchListener.ClickListener() {
@Override @Override
public void onClick(View view, int position) { public void onClick(View view, int position) {
System.out.println("Click on "+Name.get(position).toString()); //System.out.println("Click on "+Name.get(position).toString());
explorer(Name.get(position).toString()); explorer(Name.get(position).toString());
} }
@Override @Override
public void onLongClick(View view, int position) { public void onLongClick(View view, int position) {
System.out.println("Long click on "+Name.get(position).toString()); //System.out.println("Long click on "+Name.get(position).toString());
} }
})); }));
} }

View file

@ -23,7 +23,7 @@ public class ImageViewer extends AppCompatActivity {
final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar); final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar);
String videoURL = getIntent().getStringExtra("video_url"); String videoURL = getIntent().getStringExtra("video_url");
ImageView iv=(ImageView) findViewById(R.id.imageViewer); ImageView iv=(ImageView) findViewById(R.id.imageViewer);
System.out.println(videoURL); //System.out.println(videoURL);
Thread imgread = new Thread(new Runnable() { Thread imgread = new Thread(new Runnable() {
@Override @Override

View file

@ -42,7 +42,6 @@ public class MainActivity extends AppCompatActivity {
db = dbHelper.getWritableDatabase(); db = dbHelper.getWritableDatabase();
if (db != null) { if (db != null) {
// Database Queries // Database Queries
System.out.println("Database OK");
Name = new ArrayList<String>(); Name = new ArrayList<String>();
Img = new ArrayList<String>(); Img = new ArrayList<String>();
String query = "SELECT id FROM account"; String query = "SELECT id FROM account";
@ -62,9 +61,6 @@ public class MainActivity extends AppCompatActivity {
public void run() { public void run() {
try { try {
//Your code goes here //Your code goes here
System.out.println(Name);
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
@ -101,10 +97,8 @@ public class MainActivity extends AppCompatActivity {
db = dbHelper.getWritableDatabase(); db = dbHelper.getWritableDatabase();
if (db != null) { if (db != null) {
// Database Queries // Database Queries
System.out.println("Database OK");
try { try {
String query = "SELECT endpoint, username, password, region FROM account where id=\""+ Name.get(position).toString()+ "\""; String query = "SELECT endpoint, username, password, region FROM account where id=\""+ Name.get(position).toString()+ "\"";
System.out.println(query);
Cursor cursor = db.rawQuery(query,null); Cursor cursor = db.rawQuery(query,null);
if (cursor.moveToNext()){ if (cursor.moveToNext()){
endpoint = cursor.getString(0); endpoint = cursor.getString(0);

View file

@ -1,33 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".AccountAdd"> tools:context=".AccountAdd">
<EditText <EditText
android:id="@+id/alias" android:id="@+id/alias"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="0dp"
android:focusable="true" android:focusable="true"
android:hint="@string/accountadd_alias" android:hint="@string/accountadd_alias"
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="text" android:inputType="text"
app:layout_constraintTop_toTopOf="parent" android:textColorHint="?attr/colorOnSecondary"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<LinearLayout <LinearLayout
android:id="@+id/endpointLayout" android:id="@+id/endpointLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="52dp" android:layout_height="wrap_content"
android:layout_marginTop="44dp"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp" android:padding="10dp"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="20dp"> tools:layout_editor_absoluteX="20dp">
@ -40,7 +36,7 @@
android:hint="@string/accountadd_endpoint" android:hint="@string/accountadd_endpoint"
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="textUri" android:inputType="textUri"
app:layout_constraintTop_toTopOf="parent" android:textColorHint="?attr/colorOnSecondary"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<EditText <EditText
@ -51,8 +47,8 @@
android:focusable="true" android:focusable="true"
android:hint="@string/accountadd_region" android:hint="@string/accountadd_region"
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="textUri" android:inputType="textNoSuggestions"
app:layout_constraintTop_toTopOf="parent" android:textColorHint="?attr/colorOnSecondary"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
</LinearLayout> </LinearLayout>
@ -61,28 +57,22 @@
android:id="@+id/username" android:id="@+id/username"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="96dp"
android:autofillHints="username" android:autofillHints="username"
android:focusable="true" android:focusable="true"
android:hint="@string/accountadd_username" android:hint="@string/accountadd_username"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
app:layout_constraintTop_toTopOf="parent" android:textColorHint="?attr/colorOnSecondary"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<EditText <EditText
android:id="@+id/password" android:id="@+id/password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="142dp"
android:autofillHints="username" android:autofillHints="username"
android:focusable="true" android:focusable="true"
android:hint="@string/accountadd_password" android:hint="@string/accountadd_password"
android:inputType="textPassword" android:inputType="textPassword"
app:layout_constraintTop_toTopOf="parent" android:textColorHint="?attr/colorOnSecondary"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<LinearLayout <LinearLayout
@ -91,7 +81,6 @@
android:layout_height="80dp" android:layout_height="80dp"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp" android:padding="10dp"
app:layout_constraintTop_toBottomOf="@+id/password"
tools:ignore="MissingConstraints" tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="20dp"> tools:layout_editor_absoluteX="20dp">
@ -113,4 +102,4 @@
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout>

View file

@ -10,10 +10,11 @@
android:id="@+id/imageViewer" android:id="@+id/imageViewer"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:contentDescription="@string/Image"
app:srcCompat="@drawable/empty" app:srcCompat="@drawable/empty"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp" tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="82dp" tools:layout_editor_absoluteY="82dp" />
tools:ignore="MissingConstraints" />
<ProgressBar <ProgressBar
android:id="@+id/simpleProgressBar" android:id="@+id/simpleProgressBar"

View file

@ -7,12 +7,6 @@
android:orientation="vertical" android:orientation="vertical"
tools:context=".MainActivity"> tools:context=".MainActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/accountselect"
android:textAlignment="center"
android:textSize="25sp" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout" android:id="@+id/linearLayout"
@ -43,6 +37,13 @@
</LinearLayout> </LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/accountselect"
android:textAlignment="center"
android:textSize="25sp" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/alist" android:id="@+id/alist"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -8,7 +8,7 @@
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item> <item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item> <item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. --> <!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. --> <!-- Customize your theme here. -->

View file

@ -5,6 +5,7 @@
<string name="account_list">Account list</string> <string name="account_list">Account list</string>
<string name="bucket_list">Bucket list</string> <string name="bucket_list">Bucket list</string>
<string name="object_list">Object list</string> <string name="object_list">Object list</string>
<string name="Image">Image</string>
<string name="broken_database">Local database is corrupted. Please reinstall this app</string> <string name="broken_database">Local database is corrupted. Please reinstall this app</string>
<string name="pending_feature">This feature is not implemented yet</string> <string name="pending_feature">This feature is not implemented yet</string>
<string name="file_external">Open in</string> <string name="file_external">Open in</string>