Ver código fonte

Add Main Activity UI.

pull/11/head
Mushegh Sahakyan 4 anos atrás
pai
commit
292df6633c
28 arquivos alterados com 124 adições e 34 exclusões
  1. BIN
     
  2. BIN
     
  3. BIN
     
  4. BIN
     
  5. BIN
     
  6. BIN
     
  7. BIN
     
  8. BIN
     
  9. BIN
     
  10. BIN
     
  11. BIN
     
  12. BIN
     
  13. BIN
     
  14. BIN
     
  15. BIN
     
  16. BIN
     
  17. BIN
     
  18. BIN
     
  19. BIN
     
  20. BIN
     
  21. BIN
     
  22. BIN
     
  23. BIN
     
  24. BIN
     
  25. +8
    -8
      ui/src/main/res/layout/activity_login.xml
  26. +110
    -21
      ui/src/main/res/layout/activity_main.xml
  27. +1
    -1
      ui/src/main/res/values/dimens.xml
  28. +5
    -4
      ui/src/main/res/values/strings.xml
























+ 8
- 8
ui/src/main/res/layout/activity_login.xml Ver arquivo

@@ -73,7 +73,7 @@
android:fontFamily="@font/lato"
android:text="@string/bubble_name"
android:textColor="@color/black"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/signIn" />
@@ -89,7 +89,7 @@
android:hint="@string/enter_your_bubble_name"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bubbleNameTitle" />
@@ -104,7 +104,7 @@
android:fontFamily="@font/lato"
android:text="@string/you_can_find_your_bubble_name_in_your_email"
android:textColor="@color/gray"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bubbleName" />
@@ -119,7 +119,7 @@
android:fontFamily="@font/lato"
android:text="@string/email"
android:textColor="@color/black"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/findBubble" />
@@ -135,7 +135,7 @@
android:hint="@string/email_you_used_to_sign_up"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/emailTitle" />
@@ -150,7 +150,7 @@
android:fontFamily="@font/lato"
android:text="@string/password"
android:textColor="@color/black"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/userName" />
@@ -166,7 +166,7 @@
android:hint="@string/your_password"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="@dimen/login_text_title"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/passwordTitle" />
@@ -196,7 +196,7 @@
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="@dimen/login_text_title" />
android:textSize="@dimen/text_title" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

+ 110
- 21
ui/src/main/res/layout/activity_main.xml Ver arquivo

@@ -8,52 +8,141 @@
tools:context="com.wireguard.android.activity.MainActivity">

<TextView
android:id="@+id/bubbleConnectionTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="32dp"
android:layout_marginEnd="@dimen/margin_start_and_end"
android:fontFamily="@font/josefin_sans"
android:letterSpacing="-0.02"
android:text="@string/my_bubble"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/black"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.085" />
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bubble_status"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="@dimen/margin_start_and_end"
android:layout_marginEnd="@dimen/margin_start_and_end"
android:text="@string/your_private_bubble"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.112"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.183" />
app:layout_constraintTop_toBottomOf="@+id/bubbleConnectionTitle" />


<ImageView
android:id="@+id/imageMyBubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="@dimen/margin_start_and_end"
android:layout_marginEnd="@dimen/margin_start_and_end"
android:src="@drawable/bubble_disconnected"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title" />

<TextView
android:id="@+id/titleMyBubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="110dp"
android:letterSpacing="-0.05"
android:text="@string/bubble_status"
android:textColor="@android:color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="@+id/imageMyBubble"
app:layout_constraintStart_toStartOf="@+id/imageMyBubble"
app:layout_constraintTop_toTopOf="@+id/imageMyBubble" />

<TextView
android:id="@+id/bubbleStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="14dp"
android:layout_marginEnd="@dimen/margin_start_and_end"
android:text="@string/not_connected_bubble"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/gray"
android:textSize="@dimen/text_title"
app:layout_constraintEnd_toEndOf="@+id/imageMyBubble"
app:layout_constraintStart_toStartOf="@+id/imageMyBubble"
app:layout_constraintTop_toBottomOf="@+id/titleMyBubble" />

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="@dimen/edit_text_width"
android:layout_height="@dimen/edit_text_height"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="300dp"
android:layout_marginEnd="@dimen/margin_start_and_end"
android:background="@color/white"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.75"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.183" />
app:layout_constraintTop_toTopOf="@+id/imageMyBubble">

<Button
android:id="@+id/connectButton"
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/connectButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/sign_in_enable"
android:enabled="true"
android:text="@string/connect"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="@dimen/text_title" />
</LinearLayout>

<ImageButton
android:id="@+id/myBubbleImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="264dp"
android:text="@string/connect"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="60dp"
android:layout_marginEnd="180dp"
android:layout_marginBottom="60dp"
android:background="@drawable/my_bubble"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/imageMyBubble" />

<ImageButton
android:id="@+id/accountImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_start_and_end"
android:layout_marginTop="60dp"
android:layout_marginEnd="@dimen/margin_start_and_end"
android:layout_marginBottom="60dp"
android:background="@drawable/account"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/myBubbleImageView"
app:layout_constraintTop_toBottomOf="@+id/imageMyBubble" />

<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="70dp"
android:layout_marginBottom="24dp"
android:background="@drawable/home"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/accountImageView"
app:layout_constraintStart_toEndOf="@+id/myBubbleImageView"
app:layout_constraintTop_toBottomOf="@+id/imageMyBubble" />


</androidx.constraintlayout.widget.ConstraintLayout>

+ 1
- 1
ui/src/main/res/values/dimens.xml Ver arquivo

@@ -9,7 +9,7 @@

<!--Bubble dimens-->
<dimen name="title">24sp</dimen>
<dimen name="login_text_title">14sp</dimen>
<dimen name="text_title">14sp</dimen>
<dimen name="margin_start_and_end">16dp</dimen>
<dimen name="margin_top">8dp</dimen>
<dimen name="edit_text_width">254dp</dimen>


+ 5
- 4
ui/src/main/res/values/strings.xml Ver arquivo

@@ -233,16 +233,16 @@
<string name="sign_in">Sign In</string>
<string name="don_t_have_a_bubble">Don\'t have a Bubble?</string>
<string name="start_new_bubble">Start New Bubble</string>
<string name="my_bubble">My Bubble</string>
<string name="bubble_status">Bubble Status:</string>
<string name="my_bubble">Bubble Connection</string>
<string name="bubble_status">MY BUBBLE</string>
<string name="running">Running</string>
<string name="this_device_status">This Device Status:</string>
<string name="not_connected">Not Connected</string>
<string name="connect">Connect</string>
<string name="connect">CONNECT</string>
<string name="disable_apps">Disable Apps</string>
<string name="turnInternet">Please turn on internet connection</string>
<string name="progress_bar_text">Loading</string>
<string name="not_connected_bubble">Not Connected</string>
<string name="not_connected_bubble">Not Connected ...</string>
<string name="connected_bubble">Connected</string>
<string name="failed_bubble">Failed</string>
<string name="disconnect">Disconnect</string>
@@ -255,4 +255,5 @@
<string name="email">Email:</string>
<string name="you_can_find_your_bubble_name_in_your_email">You can find your Bubble name in your email</string>
<string name="enter_your_bubble_name">Enter your Bubble Name</string>
<string name="your_private_bubble">Your private Bubble provides \n protection on this device.</string>
</resources>

Carregando…
Cancelar
Salvar