Skip to content

Commit

Permalink
Improve design and remove server url
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisBodin committed Aug 5, 2020
1 parent a59ebaa commit c86b8c4
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 12 deletions.
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
<data
android:host="meet.infomaniak.com"
android:scheme="https" />

<data
android:host="kmeet.infomaniak.com"
android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/infomaniak/meet/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import kotlinx.android.synthetic.main.activity_home.*

class HomeActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(R.style.AppTheme)
setTheme(R.style.AppThemeHome)
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/infomaniak/meet/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import java.net.URLEncoder

class MainActivity : AppCompatActivity() {

private val serveur = "https://meet.infomaniak.com/"
private val serveur = "https://kmeet.infomaniak.com/"
private val serverURL = URL(serveur)
private val hashCharList = ('a'..'z').toList().toTypedArray()
private lateinit var idRoom: String
Expand Down Expand Up @@ -109,7 +109,7 @@ class MainActivity : AppCompatActivity() {
private fun checkRoomname(callback: (userName: String) -> Unit) {
val roomName = roomNameEdit.text.toString()
if (roomName.isNotEmpty()) {
callback(roomName)
callback(roomName.replace(serveur, ""))
} else {
roomNameLayout.error = getString(R.string.mandatoryField)
}
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
android:layout_marginTop="32dp"
android:src="@drawable/ic_logo_meet"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintWidth_max="@dimen/standardMaxWidth"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent="0.6" />
Expand All @@ -32,11 +33,14 @@

<LinearLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/top_corner_radius"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintWidth_max="@dimen/standardMaxWidth">

<com.google.android.material.button.MaterialButton
android:id="@+id/createButton"
Expand Down
16 changes: 10 additions & 6 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_max="300dp"
app:layout_constraintWidth_percent="0.5" />

<TextView
Expand All @@ -42,14 +43,15 @@
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/roomNameLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/standardMargin"
android:layout_marginTop="32dp"
android:layout_marginEnd="@dimen/standardMargin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleMain">
app:layout_constraintTop_toBottomOf="@id/titleMain"
app:layout_constraintWidth_max="@dimen/standardMaxWidth">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/roomNameEdit"
Expand All @@ -68,12 +70,13 @@
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/userNameLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/standardMargin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/roomNameLayout">
app:layout_constraintTop_toBottomOf="@id/roomNameLayout"
app:layout_constraintWidth_max="@dimen/standardMaxWidth">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/userNameEdit"
Expand All @@ -93,12 +96,13 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/createButton"
style="@style/ButtonInfomaniak"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_margin="@dimen/standardMargin"
android:text="@string/startButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/userNameLayout" />
app:layout_constraintTop_toBottomOf="@+id/userNameLayout"
app:layout_constraintWidth_max="@dimen/standardMaxWidth" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
<item name="android:navigationBarColor">@color/background</item>
</style>

<style name="AppThemeHome" parent="AppTheme">
<item name="android:statusBarColor">@color/primary</item>
</style>

</resources>
17 changes: 17 additions & 0 deletions app/src/main/res/values-v23/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<resources>

<style name="AppTheme23" parent="AppThemeBase">
<item name="android:statusBarColor">@color/background</item>
<item name="android:windowLightStatusBar">true</item>
</style>

<style name="AppTheme" parent="AppTheme23" />

<style name="AppThemeHome23" parent="AppThemeBase">
<item name="android:statusBarColor">@color/primary</item>
<item name="android:windowLightStatusBar">false</item>
</style>

<style name="AppThemeHome" parent="AppThemeHome23" />

</resources>
13 changes: 13 additions & 0 deletions app/src/main/res/values-v27/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<resources>

<style name="AppTheme" parent="AppTheme23">
<item name="android:navigationBarColor">@color/background</item>
<item name="android:windowLightNavigationBar">true</item>
</style>

<style name="AppThemeHome" parent="AppThemeHome23">
<item name="android:navigationBarColor">@color/background</item>
<item name="android:windowLightNavigationBar">true</item>
</style>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<resources>
<dimen name="radius">10dp</dimen>
<dimen name="standardMargin">24dp</dimen>
<dimen name="standardMaxWidth">500dp</dimen>
</resources>
4 changes: 3 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

<style name="AppTheme" parent="AppThemeBase" />

<style name="AppTheme.Launcher">
<style name="AppThemeHome" parent="AppTheme" />

<style name="AppTheme.Launcher" parent="AppThemeHome">
<item name="android:windowBackground">@drawable/launch_screen</item>
</style>

Expand Down

0 comments on commit c86b8c4

Please sign in to comment.