Pārlūkot izejas kodu

removal of FAB from the main activity, changes in layout, explanation on the app usage

azivner 6 gadi atpakaļ
vecāks
revīzija
11af0b9faa

+ 0 - 5
app/src/main/java/io/github/zadam/triliumsender/MainActivity.kt

@@ -30,11 +30,6 @@ class MainActivity : AppCompatActivity() {
         }
         }
 
 
         setSetupStatus()
         setSetupStatus()
-
-        fab.setOnClickListener { view ->
-            Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
-                    .setAction("Action", null).show()
-        }
     }
     }
 
 
     public override fun onResume() {  // After a pause OR at startup
     public override fun onResume() {  // After a pause OR at startup

+ 0 - 9
app/src/main/res/layout/activity_main.xml

@@ -22,13 +22,4 @@
 
 
     <include layout="@layout/content_main" />
     <include layout="@layout/content_main" />
 
 
-    <android.support.design.widget.FloatingActionButton
-        android:id="@+id/fab"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="@dimen/fab_margin"
-        app:backgroundTint="@android:color/darker_gray"
-        app:srcCompat="@android:drawable/ic_input_add" />
-
 </android.support.design.widget.CoordinatorLayout>
 </android.support.design.widget.CoordinatorLayout>

+ 24 - 6
app/src/main/res/layout/content_main.xml

@@ -10,13 +10,14 @@
 
 
     <TextView
     <TextView
         android:id="@+id/setupStatusTextView"
         android:id="@+id/setupStatusTextView"
-        android:layout_width="262dp"
+        android:layout_width="350dp"
         android:layout_height="70dp"
         android:layout_height="70dp"
-        android:layout_marginBottom="24dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginStart="8dp"
+        android:layout_marginBottom="20dp"
+        android:layout_marginEnd="4dp"
+        android:layout_marginStart="4dp"
         android:layout_marginTop="8dp"
         android:layout_marginTop="8dp"
         android:text=""
         android:text=""
+        android:textSize="18sp"
         app:layout_constraintBottom_toTopOf="@+id/setupConnectionButton"
         app:layout_constraintBottom_toTopOf="@+id/setupConnectionButton"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -27,12 +28,29 @@
         android:id="@+id/setupConnectionButton"
         android:id="@+id/setupConnectionButton"
         android:layout_width="wrap_content"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="340dp"
+        android:layout_marginBottom="20dp"
         android:layout_marginEnd="8dp"
         android:layout_marginEnd="8dp"
         android:layout_marginStart="8dp"
         android:layout_marginStart="8dp"
+        android:layout_marginTop="20dp"
         android:text="@string/trilium_connection_settings"
         android:text="@string/trilium_connection_settings"
+        app:layout_constraintBottom_toTopOf="@+id/textView"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/setupStatusTextView" />
+
+    <TextView
+        android:id="@+id/textView"
+        android:layout_width="350dp"
+        android:layout_height="107dp"
+        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="4dp"
+        android:layout_marginStart="4dp"
+        android:layout_marginTop="8dp"
+        android:text="Please note that this view is used only for setup. For adding notes, use another shortcut called 'Add note' and to add image, you need to share it to 'Trilium Sender' from gallery app."
+        android:textSize="18sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/setupConnectionButton" />
 
 
 </android.support.constraint.ConstraintLayout>
 </android.support.constraint.ConstraintLayout>