diff --git a/app/src/main/java/com/bigri239/easymusic/FaqActivity.kt b/app/src/main/java/com/bigri239/easymusic/FaqActivity.kt index 28236a3..60a8d38 100644 --- a/app/src/main/java/com/bigri239/easymusic/FaqActivity.kt +++ b/app/src/main/java/com/bigri239/easymusic/FaqActivity.kt @@ -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 } } \ No newline at end of file diff --git a/app/src/main/java/com/bigri239/easymusic/TermsActivity.kt b/app/src/main/java/com/bigri239/easymusic/TermsActivity.kt index 8ad20da..bd90731 100644 --- a/app/src/main/java/com/bigri239/easymusic/TermsActivity.kt +++ b/app/src/main/java/com/bigri239/easymusic/TermsActivity.kt @@ -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 @@ -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()) diff --git a/app/src/main/java/com/bigri239/easymusic/TutorialActivity.kt b/app/src/main/java/com/bigri239/easymusic/TutorialActivity.kt index 51a91da..89571ac 100644 --- a/app/src/main/java/com/bigri239/easymusic/TutorialActivity.kt +++ b/app/src/main/java/com/bigri239/easymusic/TutorialActivity.kt @@ -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() { @@ -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 } } \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_addfiles.xml b/app/src/main/res/layout-land/activity_addfiles.xml index a51f2e9..46296aa 100644 --- a/app/src/main/res/layout-land/activity_addfiles.xml +++ b/app/src/main/res/layout-land/activity_addfiles.xml @@ -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" @@ -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" /> diff --git a/app/src/main/res/layout-land/activity_authors.xml b/app/src/main/res/layout-land/activity_authors.xml index 7c99be3..5168459 100644 --- a/app/src/main/res/layout-land/activity_authors.xml +++ b/app/src/main/res/layout-land/activity_authors.xml @@ -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" /> @@ -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" /> @@ -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" /> + app:layout_constraintTop_toBottomOf="@id/textView4" /> + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_faq.xml b/app/src/main/res/layout-land/activity_faq.xml index 9708fc9..8f2077f 100644 --- a/app/src/main/res/layout-land/activity_faq.xml +++ b/app/src/main/res/layout-land/activity_faq.xml @@ -18,29 +18,40 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - + app:layout_constraintTop_toBottomOf="@+id/faqact" + tools:context=".FaqActivity" + tools:ignore="MissingConstraints"> - + app:layout_constraintEnd_toEndOf="parent"> + + + + - + diff --git a/app/src/main/res/layout-land/activity_help.xml b/app/src/main/res/layout-land/activity_help.xml index bf8a126..037cbf8 100644 --- a/app/src/main/res/layout-land/activity_help.xml +++ b/app/src/main/res/layout-land/activity_help.xml @@ -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" /> diff --git a/app/src/main/res/layout-land/activity_sign_in.xml b/app/src/main/res/layout-land/activity_sign_in.xml index 2a8e75f..c5dd5f7 100644 --- a/app/src/main/res/layout-land/activity_sign_in.xml +++ b/app/src/main/res/layout-land/activity_sign_in.xml @@ -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" /> diff --git a/app/src/main/res/layout-land/activity_sign_up.xml b/app/src/main/res/layout-land/activity_sign_up.xml index 3cf6e63..be19ee3 100644 --- a/app/src/main/res/layout-land/activity_sign_up.xml +++ b/app/src/main/res/layout-land/activity_sign_up.xml @@ -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" /> diff --git a/app/src/main/res/layout-land/activity_terms.xml b/app/src/main/res/layout-land/activity_terms.xml index b06332d..a4a73b1 100644 --- a/app/src/main/res/layout-land/activity_terms.xml +++ b/app/src/main/res/layout-land/activity_terms.xml @@ -18,29 +18,39 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - + app:layout_constraintTop_toBottomOf="@+id/termsact" + tools:context=".FaqActivity" + tools:ignore="MissingConstraints"> - + - + + + +