Skip to content

Commit

Permalink
Merge pull request #168 from OSLL/Alex0
Browse files Browse the repository at this point in the history
1.0.5 beta
  • Loading branch information
bialger authored Aug 22, 2022
2 parents 7919a88 + 3cd4445 commit 82166b3
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 79 deletions.
8 changes: 8 additions & 0 deletions app/src/main/java/com/bigri239/easymusic/FaqActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,13 @@ class FaqActivity : AppCompatActivity() {
"3. Q: What should I do if the audio tracks on the screen have shifted relative to each other? \n" +
"A: Scroll all the way to the end or start of the project. To avoid this error, do not scroll audio tracks too abruptly."
}

val scale: Float = resources.displayMetrics.density
val displayMetrics = resources.displayMetrics
val pixelsWidth = (displayMetrics.widthPixels * 0.95F).toInt()
val pixelsHeight = (displayMetrics.heightPixels * 0.95F - 100 * scale + 0.5f).toInt()

scroll.layoutParams.height = pixelsHeight
scroll.layoutParams.width = pixelsWidth
}
}
11 changes: 11 additions & 0 deletions app/src/main/java/com/bigri239/easymusic/TermsActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import android.os.StrictMode
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.bigri239.easymusic.net.WebRequester
import kotlinx.android.synthetic.main.activity_faq.*
import kotlinx.android.synthetic.main.activity_terms.*
import kotlinx.android.synthetic.main.activity_terms.scroll
import kotlinx.android.synthetic.main.activity_terms.text_view
import java.io.File
import java.io.FileOutputStream

Expand Down Expand Up @@ -50,6 +53,14 @@ class TermsActivity : AppCompatActivity() {
"4. When uploading information to the account, in particular, project files, the User implicitly consents to the free distribution of this information among the users of the application."
}

val scale: Float = resources.displayMetrics.density
val displayMetrics = resources.displayMetrics
val pixelsWidth = (displayMetrics.widthPixels * 0.95F).toInt()
val pixelsHeight = (displayMetrics.heightPixels * 0.95F - 100 * scale + 0.5f).toInt()

scroll.layoutParams.height = pixelsHeight
scroll.layoutParams.width = pixelsWidth

btnAccept.setOnClickListener {
btnAccept.isClickable = false
FileOutputStream(file).write("1".toByteArray())
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/com/bigri239/easymusic/TutorialActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import android.os.Bundle
import android.os.StrictMode
import androidx.appcompat.app.AppCompatActivity
import com.bigri239.easymusic.net.WebRequester
import kotlinx.android.synthetic.main.activity_faq.*
import kotlinx.android.synthetic.main.activity_tutorial.*
import kotlinx.android.synthetic.main.activity_tutorial.scroll

@Suppress("DEPRECATION")
class TutorialActivity : AppCompatActivity() {
Expand Down Expand Up @@ -42,5 +44,13 @@ class TutorialActivity : AppCompatActivity() {
"7) The Account menu contains information about your account. If you are using the application for the first time, go to the Sign up menu, enter your email and password. An email will be sent to you to confirm your account. Open it and click on the link. After that, return to the application and re-enter your username and password in the log in menu. You will be redirected to your profile, where you can fill in information about yourself. The screen will display a list of your downloaded sounds and projects. To add a sound or a project to a profile, click on the add button under the corresponding list, and select the desired list item. Here you can also add a friend who also uses our application. To do this, just click the add button and enter your friend's email. You can go to his profile to view his friend's projects. When you click on a friend's project, it will be copied to your projects. \n\n" +
"8) In the Help activity you will find the user agreement, answers to frequently asked questions and information about the authors."
}

val scale: Float = resources.displayMetrics.density
val displayMetrics = resources.displayMetrics
val pixelsWidth = (displayMetrics.widthPixels * 0.95F).toInt()
val pixelsHeight = (displayMetrics.heightPixels * 0.95F - 50 * scale + 0.5f).toInt()

scroll.layoutParams.height = pixelsHeight
scroll.layoutParams.width = pixelsWidth
}
}
6 changes: 4 additions & 2 deletions app/src/main/res/layout-land/activity_addfiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
android:id="@+id/constraintLayout1"
android:layout_width="wrap_content"
android:layout_height="200dp"
app:layout_constraintStart_toStartOf="@id/back_A"
app:layout_constraintHorizontal_bias="0.075"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/button5"
app:layout_constraintTop_toBottomOf="@+id/from"
tools:context=".AddingfilesActivity"
Expand Down Expand Up @@ -120,7 +122,7 @@
android:layout_height="wrap_content"
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
34 changes: 26 additions & 8 deletions app/src/main/res/layout-land/activity_authors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/authorsact" />
Expand All @@ -49,7 +49,7 @@
android:textColor="@color/colorAccent"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@id/backauth"
app:layout_constraintVertical_bias="0.45"
app:layout_constraintVertical_bias="0.4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -62,9 +62,7 @@
android:textColor="@android:color/holo_blue_dark"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="@+id/textView3"
app:layout_constraintVertical_bias="0.2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@id/textView3" />

<TextView
android:id="@+id/textView6"
Expand All @@ -74,9 +72,7 @@
android:text="https://vk.com/id455049530"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="@id/backauth"
app:layout_constraintVertical_bias="0.55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@id/textView4" />

<TextView
android:id="@+id/textView10"
Expand All @@ -89,4 +85,26 @@
app:layout_constraintStart_toStartOf="@+id/textView5"
app:layout_constraintTop_toBottomOf="@+id/textView5" />

<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Our GitHub"
android:textColor="@color/colorAccent"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@id/backauth"
app:layout_constraintVertical_bias="0.7"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="all"
android:text="https://github.com/OSLL/circle21-music"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="@id/backauth"
app:layout_constraintTop_toBottomOf="@id/textView11" />

</androidx.constraintlayout.widget.ConstraintLayout>
47 changes: 29 additions & 18 deletions app/src/main/res/layout-land/activity_faq.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,48 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ScrollView
android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="260dp"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/textView7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/faqact">
app:layout_constraintTop_toBottomOf="@+id/faqact"
tools:context=".FaqActivity"
tools:ignore="MissingConstraints">

<TextView
android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:scrollbars="vertical"
android:text=""
android:textColor="@color/colorAccent"
android:textSize="18sp"
<ScrollView
android:id="@+id/scroll"
android:layout_width="550dp"
android:layout_height="260dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
app:layout_constraintEnd_toEndOf="parent">

<TextView
android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:scrollbars="vertical"
android:text=""
android:textColor="@color/colorAccent"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent" />

</ScrollView>

</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

<TextView
android:id="@+id/backfaq"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/faqact" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/activity_help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:layout_height="wrap_content"
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/activity_sign_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
android:layout_height="wrap_content"
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/activity_sign_up.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
android:layout_height="wrap_content"
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
56 changes: 31 additions & 25 deletions app/src/main/res/layout-land/activity_terms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,47 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ScrollView
android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="260dp"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/btnAccept"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/termsact">
app:layout_constraintTop_toBottomOf="@+id/termsact"
tools:context=".FaqActivity"
tools:ignore="MissingConstraints">

<TextView
android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:scrollbars="vertical"
android:text=""
android:textColor="@color/colorAccent"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<ScrollView
android:id="@+id/scroll"
android:layout_width="550dp"
android:layout_height="260dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent">

</ScrollView>
<TextView
android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:scrollbars="vertical"
android:text=""
android:textColor="@color/colorAccent"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

<Button
android:id="@+id/btnAccept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I have read &amp; Accept Terms"
android:textSize="14sp"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@id/constraintLayout1"
app:layout_constraintBottom_toBottomOf="@+id/btnDecline" />

<Button
Expand All @@ -59,9 +67,7 @@
android:layout_height="wrap_content"
android:text="I decline Terms"
android:textSize="14sp"
app:layout_constraintHorizontal_bias="0.95"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="@id/constraintLayout1"
app:layout_constraintBottom_toBottomOf="parent" />

<TextView
Expand All @@ -71,7 +77,7 @@
android:text="BACK"
android:textColor="@color/colorAccent"
app:layout_constraintBottom_toBottomOf="@+id/termsact"
app:layout_constraintHorizontal_bias="0.05"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/termsact" />
Expand Down
Loading

0 comments on commit 82166b3

Please sign in to comment.