Skip to content

Commit

Permalink
0.0.17b
Browse files Browse the repository at this point in the history
- Added Animations in SplashScreen, First-run Speak and Listen, WebBrowser loading and Home (Speak and Listen buttons)
- Updated README.md
- Renamed "fastline"->"fastlane"
- Now it's available Landscape mode (note: The app is thought to work correctly especially in portrait mode)
  • Loading branch information
Sav22999 committed Jan 11, 2020
1 parent 615fb56 commit c68cc2b
Show file tree
Hide file tree
Showing 43 changed files with 454 additions and 286 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

This is not the official app of the project Common Voice by Mozilla. This app is developed by Saverio Morelli, via Android Studio, because of there isn’t an official app for Android.

If you have any questions, please open an issue.
[![Crowdin](https://badges.crowdin.net/common-voice-android/localized.svg)](https://crowdin.com/project/common-voice-android)[![Generic badge](https://img.shields.io/badge/supported%20languages-4-green.svg)](https://saveriomorelli.com)[![GitHub release](https://img.shields.io/github/release/Sav22999/common-voice-android.svg)](https://github.com/Sav22999/common-voice-android/releases/)[![GitHub license](https://img.shields.io/github/license/Sav22999/common-voice-android.svg)](https://github.com/Sav22999/common-voice-android/blob/master/LICENSE)[![Github all releases](https://img.shields.io/github/downloads/Sav22999/common-voice-android/total.svg)](https://GitHub.com/Sav22999/common-voice-android/releases/)![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)

[<img src="images/googlePlayBadge.png" width="200px"></img>](https://play.google.com/store/apps/details?id=org.commonvoice.saverio) [<img src="images/aptoideBadge.png" height="50px"></img>](https://common-voice-android.en.aptoide.com/?store_name=sav22999&app_id=49778274)

If you have any questions, please open an issue.

You can contact me also on Telegram, with the username `@Sav22999`.

### How contribute
Expand All @@ -17,7 +19,7 @@ If you want to help to develop this app, you can open an `Issue` an send feedbac
You can contribute also to translate the app:

- **Open a new issue** (use `Translation` template), so others know you are translating the app in that language
- Then go to Crowdin](https://crowdin.com/project/common-voice-android), choose your language (you can ask for a new language if it’s not in the list) and translate strings.
- Then go to [Crowdin](https://crowdin.com/project/common-voice-android), choose your language (you can ask for a new language if it’s not in the list) and translate strings.

#### To do:

Expand All @@ -28,7 +30,7 @@ You can contribute also to translate the app:

### Screenshots

<img src="fastline/metadata/android/en-US/images/phoneScreenshots/1.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/2.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/3.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/4.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/5.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/6.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/7.png" width="200px"></img><img src="fastline/metadata/android/en-US/images/phoneScreenshots/8.png" width="200px"></img>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/7.png" width="200px"></img><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/8.png" width="200px"></img>

If you want screenshots of the other versions, go to the `screenshots` folder.

Expand All @@ -49,4 +51,10 @@ The app is officially translated in these following languages, **thank you very

The license of *Common Voice Android* is GPLv3.

<img src="images/gpl.png" width="100px"></img>
<img src="images/gpl.png" width="100px"></img>



![Generic badge](https://img.shields.io/badge/built%20in-Android%20Studio-green.svg)![Generic badge](https://img.shields.io/badge/developed%20in-Kotlin-blue.svg)

![GitHub last commit](https://img.shields.io/github/last-commit/Sav22999/common-voice-android)[![Generic badge](https://img.shields.io/badge/developed%20by-Sav22999-lightgrey.svg)](https://saveriomorelli.com)
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.commonvoice.saverio"
minSdkVersion 23
targetSdkVersion 28
versionCode = 32
versionName '0.0.16b'
versionCode = 34
versionName '0.0.17b'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Binary file modified app/release/app-release.aab
Binary file not shown.
6 changes: 0 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<!-- First start (TutorialActivity) -->
<activity
android:screenOrientation="portrait"
android:name=".TutorialActivity"
android:theme="@style/AppTheme.FullScreen"
android:label="@string/app_name" >
</activity>
<!-- The actual app (MainActivity) -->
<activity
android:screenOrientation="portrait"
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
Expand All @@ -39,21 +37,18 @@
</activity>
<!-- SpeakActivity -->
<activity
android:screenOrientation="portrait"
android:name=".SpeakActivity"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
</activity>
<!-- ListenActivity -->
<activity
android:screenOrientation="portrait"
android:name=".ListenActivity"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
</activity>
<!-- LoginActivity -->
<activity
android:screenOrientation="portrait"
android:name=".LoginActivity"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
Expand Down Expand Up @@ -81,7 +76,6 @@
</activity>
<!-- Restart -->
<activity
android:screenOrientation="portrait"
android:name=".RestartActivity"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
Expand Down
37 changes: 33 additions & 4 deletions app/src/main/java/org/commonvoice/saverio/FirstRunListen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ package org.commonvoice.saverio
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import android.view.animation.Animation
import android.view.animation.Animation.AnimationListener
import android.view.animation.AnimationUtils
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isGone


class FirstRunListen : AppCompatActivity() {

var status: Int = 0
Expand Down Expand Up @@ -69,14 +73,17 @@ class FirstRunListen : AppCompatActivity() {
txtNumberBottom.isGone = false
txtTextBottom.isGone = false
txtOne.isGone = false
startAnimation(txtOne)
} else if (this.status == 1) {
this.status = 2
btnNext.setText(getString(R.string.btn_tutorial3))
txtNumberBottom.setText("2")
txtTextBottom.setText(getString(R.string.txt2_tutorial_speak_and_listen))
txtNumberBottom.isGone = false
txtTextBottom.isGone = false
txtNumberTop.setText("2")
txtTextTop.setText(getString(R.string.txt2_tutorial_speak_and_listen))
txtNumberTop.isGone = false
txtTextTop.isGone = false
txtTwo.isGone = false
stopAnimation(txtOne)
startAnimation(txtTwo)
} else if (this.status == 2) {
this.status = 3
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -85,6 +92,8 @@ class FirstRunListen : AppCompatActivity() {
txtNumberTop.isGone = false
txtTextTop.isGone = false
txtThree.isGone = false
stopAnimation(txtTwo)
startAnimation(txtThree)
} else if (this.status == 3) {
this.status = 4
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -93,6 +102,8 @@ class FirstRunListen : AppCompatActivity() {
txtNumberTop.isGone = false
txtTextTop.isGone = false
txtFour.isGone = false
stopAnimation(txtThree)
startAnimation(txtFour)
} else if (this.status == 4) {
this.status = 5
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -103,6 +114,8 @@ class FirstRunListen : AppCompatActivity() {
txtFour.isGone = false
txtFour.setText("5")
btnPlay.setImageResource(R.drawable.stop_cv)
stopAnimation(txtFour)
startAnimation(txtFour)
} else if (this.status == 5) {
this.status = 6
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -115,6 +128,8 @@ class FirstRunListen : AppCompatActivity() {
btnPlay.setImageResource(R.drawable.listen2_cv)
btnYes.isGone = false
btnNo.isGone = false
stopAnimation(txtFour)
startAnimation(txtFour)
} else if (this.status == 6) {
this.status = 7
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -126,6 +141,8 @@ class FirstRunListen : AppCompatActivity() {
btnPlay.setImageResource(R.drawable.listen2_cv)
btnYes.isGone = false
btnNo.isGone = false
stopAnimation(txtFour)
startAnimation(txtSeven)
} else if (this.status == 7) {
this.status = 8
btnNext.setText(getString(R.string.btn_tutorial5))
Expand All @@ -137,6 +154,8 @@ class FirstRunListen : AppCompatActivity() {
btnPlay.setImageResource(R.drawable.listen2_cv)
btnYes.isGone = false
btnNo.isGone = false
stopAnimation(txtSeven)
startAnimation(txtEight)
} else if (this.status == 8) {
val sharedPref: SharedPreferences = getSharedPreferences(FIRST_RUN_LISTEN, PRIVATE_MODE)
var editor = sharedPref.edit()
Expand All @@ -149,4 +168,14 @@ class FirstRunListen : AppCompatActivity() {
finish()
}
}

fun startAnimation(img: Button) {
var animation: Animation =
AnimationUtils.loadAnimation(applicationContext, R.anim.zoom_in)
img.startAnimation(animation)
}

fun stopAnimation(img: Button) {
img.clearAnimation()
}
}
37 changes: 33 additions & 4 deletions app/src/main/java/org/commonvoice/saverio/FirstRunSpeak.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package org.commonvoice.saverio
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import android.view.animation.Animation
import android.view.animation.AnimationUtils
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
Expand Down Expand Up @@ -71,14 +73,17 @@ class FirstRunSpeak : AppCompatActivity() {
txtNumberBottom.isGone = false
txtTextBottom.isGone = false
txtOne.isGone = false
startAnimation(txtOne)
} else if (this.status == 1) {
this.status = 2
btnNext.setText(getString(R.string.btn_tutorial3))
txtNumberBottom.setText("2")
txtTextBottom.setText(getString(R.string.txt2_tutorial_speak_and_listen))
txtNumberBottom.isGone = false
txtTextBottom.isGone = false
txtNumberTop.setText("2")
txtTextTop.setText(getString(R.string.txt2_tutorial_speak_and_listen))
txtNumberTop.isGone = false
txtTextTop.isGone = false
txtTwo.isGone = false
stopAnimation(txtOne)
startAnimation(txtTwo)
} else if (this.status == 2) {
this.status = 3
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -87,6 +92,8 @@ class FirstRunSpeak : AppCompatActivity() {
txtNumberTop.isGone = false
txtTextTop.isGone = false
txtThree.isGone = false
stopAnimation(txtTwo)
startAnimation(txtThree)
} else if (this.status == 3) {
this.status = 4
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -96,6 +103,8 @@ class FirstRunSpeak : AppCompatActivity() {
txtTextTop.isGone = false
txtFour.isGone = false
txtFour.setText("4")
stopAnimation(txtThree)
startAnimation(txtFour)
} else if (this.status == 4) {
this.status = 5
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -106,6 +115,8 @@ class FirstRunSpeak : AppCompatActivity() {
txtFour.isGone = false
txtFour.setText("5")
btnRecord.setImageResource(R.drawable.stop_cv)
stopAnimation(txtFour)
startAnimation(txtFour)
} else if (this.status == 5) {
this.status = 6
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -116,6 +127,8 @@ class FirstRunSpeak : AppCompatActivity() {
txtFour.isGone = false
txtFour.setText("6")
btnRecord.setImageResource(R.drawable.listen2_cv)
stopAnimation(txtFour)
startAnimation(txtFour)
} else if (this.status == 6) {
this.status = 7
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -129,6 +142,8 @@ class FirstRunSpeak : AppCompatActivity() {
btnSend.isGone = false
txtSend.isGone = false
btnRecord.setImageResource(R.drawable.speak2_cv)
stopAnimation(txtFour)
startAnimation(txtFour)
} else if (this.status == 7) {
this.status = 8
btnNext.setText(getString(R.string.btn_tutorial3))
Expand All @@ -141,6 +156,8 @@ class FirstRunSpeak : AppCompatActivity() {
btnSend.isGone = false
txtSend.isGone = false
btnRecord.setImageResource(R.drawable.speak2_cv)
stopAnimation(txtFour)
startAnimation(txtEight)
} else if (this.status == 8) {
this.status = 9
btnNext.setText(getString(R.string.btn_tutorial5))
Expand All @@ -153,6 +170,8 @@ class FirstRunSpeak : AppCompatActivity() {
btnRecord.setImageResource(R.drawable.speak2_cv)
btnSend.isGone = false
txtSend.isGone = false
stopAnimation(txtEight)
startAnimation(txtNine)
} else if (this.status == 9) {
val sharedPref: SharedPreferences = getSharedPreferences(FIRST_RUN_SPEAK, PRIVATE_MODE)
var editor = sharedPref.edit()
Expand All @@ -165,4 +184,14 @@ class FirstRunSpeak : AppCompatActivity() {
finish()
}
}

fun startAnimation(img: Button) {
var animation: Animation =
AnimationUtils.loadAnimation(applicationContext, R.anim.zoom_in)
img.startAnimation(animation)
}

fun stopAnimation(img: Button) {
img.clearAnimation()
}
}
26 changes: 24 additions & 2 deletions app/src/main/java/org/commonvoice/saverio/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.net.ConnectivityManager
import android.os.Bundle
import android.view.View
import android.view.animation.Animation
import android.view.animation.AnimationUtils
import android.webkit.CookieManager
import android.webkit.WebView
import android.webkit.WebViewClient
Expand All @@ -16,14 +19,12 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.android.volley.AuthFailureError
import com.android.volley.Request
import com.android.volley.Response
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley
import kotlinx.android.synthetic.main.activity_login.*
import kotlinx.android.synthetic.main.fragment_dashboard.*
import org.json.JSONObject


Expand Down Expand Up @@ -91,13 +92,15 @@ class LoginActivity : AppCompatActivity() {
txtLoading.isGone = false
bgLoading.isGone = false
imgLoading.isGone = false
startAnimation(imgLoading)
}

override fun onPageFinished(view: WebView?, url: String?) {
// Loading finished
txtLoading.isGone = true
bgLoading.isGone = true
imgLoading.isGone = true
stopAnimation(imgLoading)

var cookies: String? = CookieManager.getInstance().getCookie(url)
//println(" ---->> "+url+" >> "+CookieManager.getInstance().getCookie(url)+" <<---- ")
Expand Down Expand Up @@ -182,6 +185,15 @@ class LoginActivity : AppCompatActivity() {
finish()
}

fun doAnimation() {
val img = findViewById<View>(R.id.imgRobotWebBrowser) as ImageView

val aniSlide: Animation =
AnimationUtils.loadAnimation(applicationContext, R.anim.zoom_in)
img.startAnimation(aniSlide)

}

fun loadUserData(type: String) {
if (type == "profile") {
var profileImage: ImageView = findViewById(R.id.imageProfileImage)
Expand Down Expand Up @@ -375,4 +387,14 @@ class LoginActivity : AppCompatActivity() {
openMainAfterLogin()
}
}

fun startAnimation(img: ImageView) {
var animation: Animation =
AnimationUtils.loadAnimation(applicationContext, R.anim.login)
img.startAnimation(animation)
}

fun stopAnimation(img: ImageView) {
img.clearAnimation()
}
}
Loading

0 comments on commit c68cc2b

Please sign in to comment.