Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Redesigned WebRTC welcome screen (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
idzkowski-google authored Aug 27, 2020
1 parent 561febb commit 942fe2f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 29 deletions.
1 change: 1 addition & 0 deletions WebRTCSample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'third_party/autobanh/lib', include: ['autobanh.jar'])
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.example.glass.ui:gesture-lib-sample:0.1.0-SNAPSHOT'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'org.webrtc:google-webrtc:1.0.30039'
Expand Down
83 changes: 55 additions & 28 deletions WebRTCSample/app/res/layout/glass_activity_connect.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:padding="32dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:text="@string/navigate_to"
android:textSize="32sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:text="@string/connect_on_another_device"
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/https_appr_tc"
android:textSize="40sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />

<TextView
android:id="@+id/room_name_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textSize="40sp" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:fontFamily="sans-serif-light"
android:text="@string/enter_room_name"
android:textSize="32sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3" />

<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/tap_to_connect"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"/>
</LinearLayout>
<TextView
android:id="@+id/room_name_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="40sp"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />

<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/tap_to_connect"
android:textSize="22sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
5 changes: 4 additions & 1 deletion WebRTCSample/app/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,11 @@
<string name="pref_use_legacy_audio_device_title">Use legacy audio device.</string>
<string name="pref_use_legacy_audio_device_default">false</string>
<string name="room_name_label">Room name</string>
<string name="connect_on_another_device">Connect to https://appr.tc/ \n on another device \n and enter room name:</string>
<string name="navigate_to">Navigate to</string>
<string name="https_appr_tc">https://appr.tc/</string>
<string name="enter_room_name">on your computer and enter room name</string>
<string name="tap_to_connect">Tap to connect</string>

<string name="menu_font">sans-serif-thin</string>

</resources>

0 comments on commit 942fe2f

Please sign in to comment.