Новый экран «Вечеринка» и исправление ошибок

This commit is contained in:
Beluga737 committed 2026-12-03 11:00:03 +07:00
1 parent 019810b777
commit 35c3fe992f
8 files changed
+119 -2

No files matched your search

+4
View File
@@ -42,6 +42,10 @@
android:name=".Settings"
android:exported="false"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".funny"
android:exported="false"
android:windowSoftInputMode="adjustResize" />
</application>
</manifest>
@@ -42,6 +42,10 @@ class MainActivity : AppCompatActivity() {
startActivity(Intent(this, Settings::class.java))
finish()
}
findViewById<View>(R.id.buttonParty).setOnClickListener {
startActivity(Intent(this, funny::class.java))
finish()
}
}
override fun onResume() {
@@ -0,0 +1,39 @@
package com.example.helponizer
import android.content.Intent
import android.graphics.RenderEffect
import android.graphics.Shader
import android.os.Build
import android.os.Bundle
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class funny : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_funny)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val blur = RenderEffect.createBlurEffect(20f, 20f, Shader.TileMode.CLAMP)
findViewById<View>(R.id.main).setRenderEffect(blur)
}
findViewById<View>(R.id.buttonOnMain).setOnClickListener {
startActivity(Intent(this, MainActivity::class.java))
finish()
}
}
override fun onResume() {
super.onResume()
TextSizeManager.applyTo(findViewById(R.id.main))
}
}
+15
View File
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/antraciton"
android:pathData="M12,2l1.6,5.4L19,9l-5.4,1.6L12,16l-1.6,-5.4L5,9l5.4,-1.6L12,2z" />
<path
android:fillColor="@color/antraciton"
android:pathData="M19,14l0.8,2.2L22,17l-2.2,0.8L19,20l-0.8,-2.2L16,17l2.2,-0.8L19,14z" />
<path
android:fillColor="@color/antraciton"
android:pathData="M5,15l0.6,1.6L7,17l-1.4,0.4L5,19l-0.6,-1.6L3,17l1.4,-0.4L5,15z" />
</vector>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/platine"
android:fillViewport="true"
tools:context=".funny">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="24dp"
android:paddingTop="32dp"
android:paddingEnd="24dp"
android:paddingBottom="24dp">
<TextView
style="@style/ScreenTitle"
android:layout_marginTop="16dp"
android:text="@string/funny_title"
android:gravity="center"/>
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:minHeight="28dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/buttonOnMain"
style="@style/PrimaryButton"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginTop="16dp"
android:text="@string/button_back_to_main"
android:textSize="15sp"/>
</LinearLayout>
</ScrollView>
@@ -76,6 +76,15 @@
android:text="@string/settings_title"
app:icon="@drawable/ic_settings" />
<com.google.android.material.button.MaterialButton
android:id="@+id/buttonParty"
style="@style/PrimaryButton"
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_marginTop="16dp"
android:text="@string/home_party"
app:icon="@drawable/ic_party" />
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
@@ -87,8 +87,7 @@
android:layout_height="35dp"
android:layout_marginTop="16dp"
android:text="@string/button_back_to_main"
android:textSize="15sp"
app:icon="@drawable/ic_back"/>
android:textSize="15sp" />
<Space
android:layout_width="match_parent"
+4
View File
@@ -7,6 +7,7 @@
<string name="home_schedule">Расписание занятий</string>
<string name="home_tips">Полезная информация</string>
<string name="home_about">О приложении</string>
<string name="home_party">Вечеринка</string>
<string name="home_footer">Учись с удовольствием!</string>
<string name="splash_subtitle">Учёба становится проще</string>
<string name="splash_footer">2026</string>
@@ -40,6 +41,9 @@
<string name="about_description">"Приложение создано для помощи студентам \n в организации учебного процесса. Оно \nпозволяет просматривать расписание занятий \nи знакомиться с полезными рекомендациями \nпо обучению."</string>
<string name="about_developer">"Разработчик:\nЧесаков Никита Сергеевич\nГруппа: ИСП-24/9\n\nГод разработки: 2026"</string>
<!-- Funny screen -->
<string name="funny_title">Вечеринка!</string>
<!-- Settings screen -->
<string name="settings_title">Настройки</string>
<string name="settings_change_palette">Сменить палитру</string>