restore from backup
3
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
6
.idea/compiler.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
20
.idea/gradle.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
41
.idea/misc.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.127" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/background.xml" value="0.264" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/blur.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/button_bg.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/error.xml" value="0.264" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_add.xml" value="0.172" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_baseline_error_24.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_bottom_toolbar_button_1.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_bottom_toolbar_button_2.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_bottom_toolbar_button_3.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_launcher_background.xml" value="0.127" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_menu.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_pin.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_save.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_user_avatar.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/drawable/ic_user_avatar_background.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/layout/activity_main.xml" value="0.2" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/layout/activity_notes_taker.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/layout/categories_list.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/layout/flashcard_create_activity.xml" value="0.264" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/layout/flashcards_list.xml" value="0.176" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/layout/notes_list.xml" value="0.264" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/menu/main_menu.xml" value="0.264" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/menu/popup_menu.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.1" />
|
||||
<entry key="..\:/Pulpit/Programowanie/AndroidStudio/FlashSign/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.1" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
47
app/build.gradle
Normal file
@ -0,0 +1,47 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.flashsign"
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
|
||||
implementation "androidx.room:room-runtime:2.4.0"
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
annotationProcessor "androidx.room:room-compiler:2.4.0"
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
|
||||
implementation 'com.github.bumptech.glide:glide:4.13.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
|
||||
}
|
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
29
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.flashsign">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.FlashSign.NoActionBar">
|
||||
<activity
|
||||
android:name=".FlashcardCreateActivity"
|
||||
android:theme="@style/Theme.FlashSign.NoActionBar"
|
||||
android:exported="true"/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
BIN
app/src/main/ic_user_avatar-playstore.png
Normal file
After Width: | Height: | Size: 36 KiB |
@ -0,0 +1,96 @@
|
||||
package com.example.flashsign.Adapters;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.example.flashsign.FlashcardsClickListener;
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
import com.example.flashsign.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FlashcardsListAdapter extends RecyclerView.Adapter<FlashcardsViewHolder> {
|
||||
|
||||
Context context;
|
||||
List<Flashcard> flashcardList;
|
||||
FlashcardsClickListener listener;
|
||||
|
||||
public FlashcardsListAdapter(Context context, List<Flashcard> flashcardList, FlashcardsClickListener listener) {
|
||||
this.context = context;
|
||||
this.flashcardList = flashcardList;
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public FlashcardsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new FlashcardsViewHolder(LayoutInflater.from(context).inflate(R.layout.flashcards_list, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull FlashcardsViewHolder holder, int position) {
|
||||
holder.textView_word.setText(flashcardList.get(position).getWord());
|
||||
holder.textView_word.setSelected(true);
|
||||
|
||||
Glide.with(context).applyDefaultRequestOptions(new RequestOptions()
|
||||
.placeholder(R.drawable.error).
|
||||
error(R.drawable.error))
|
||||
.load(flashcardList.get(position)
|
||||
.getGifUrl())
|
||||
.into(holder.imageView_gif);
|
||||
|
||||
holder.notes_container.setCardBackgroundColor(holder.itemView.
|
||||
getResources().getColor(R.color.transparent));
|
||||
|
||||
holder.notes_container.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
listener.onClick(flashcardList.get(holder.getAdapterPosition()));
|
||||
}
|
||||
});
|
||||
|
||||
holder.notes_container.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
listener.onLongClick(flashcardList.get(holder.getAdapterPosition()), holder.notes_container);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return flashcardList.size();
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
public void filterList(List<Flashcard> filteredList) {
|
||||
flashcardList = filteredList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
class FlashcardsViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
CardView notes_container;
|
||||
TextView textView_word;
|
||||
ImageView imageView_gif;
|
||||
|
||||
public FlashcardsViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
notes_container = itemView.findViewById(R.id.notes_container);
|
||||
textView_word = itemView.findViewById(R.id.textView_word);
|
||||
imageView_gif = itemView.findViewById(R.id.imageView_gif);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.example.flashsign.Database;
|
||||
|
||||
import static androidx.room.OnConflictStrategy.REPLACE;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface MainDAO {
|
||||
|
||||
@Insert(onConflict = REPLACE)
|
||||
void insert(Flashcard flashcard);
|
||||
|
||||
@Query("SELECT * FROM flashcards ORDER BY id DESC")
|
||||
List<Flashcard> getAll();
|
||||
|
||||
@Query("UPDATE flashcards SET word = :word, gifUrl = :gifUrl WHERE ID = :id")
|
||||
void update(int id, String word, String gifUrl);
|
||||
|
||||
@Delete
|
||||
void delete(Flashcard flashcard);
|
||||
}
|
31
app/src/main/java/com/example/flashsign/Database/RoomDB.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.example.flashsign.Database;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
|
||||
@Database(entities = Flashcard.class, version = 1,
|
||||
exportSchema = false)
|
||||
public abstract class RoomDB extends RoomDatabase {
|
||||
|
||||
private static RoomDB database;
|
||||
private static String DATABASE_NAME = "FlashSign";
|
||||
|
||||
|
||||
public synchronized static RoomDB getInstance(Context context) {
|
||||
if (database == null) {
|
||||
database = Room.databaseBuilder(context.getApplicationContext(),
|
||||
RoomDB.class, DATABASE_NAME)
|
||||
.allowMainThreadQueries()
|
||||
.fallbackToDestructiveMigration()
|
||||
.build();
|
||||
}
|
||||
return database;
|
||||
}
|
||||
|
||||
public abstract MainDAO mainDAO();
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.flashsign.Database;
|
||||
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
|
||||
public class TestFlashcards {
|
||||
|
||||
RoomDB database;
|
||||
|
||||
public TestFlashcards(RoomDB database) {
|
||||
this.database = database;
|
||||
Flashcard flashcard0 = new Flashcard(0, "Happy", "https://media.abilitymagazine.com/wp-content/uploads/2017/02/18122155/giphy-2.gif");
|
||||
this.database.mainDAO().insert(flashcard0);
|
||||
Flashcard flashcard1 = new Flashcard(1, "Food", "https://helios-i.mashable.com/imagery/articles/02dTgpkM1vZI2xTmdiiZoOK/images-9.fit_lim.size_376x.gif");
|
||||
this.database.mainDAO().insert(flashcard1);
|
||||
Flashcard flashcard2 = new Flashcard(2, "Eat", "https://media2.giphy.com/media/l3vRhFBHY2JT5QIdq/giphy.gif");
|
||||
this.database.mainDAO().insert(flashcard2);
|
||||
Flashcard flashcard3 = new Flashcard(3, "I don't know", "https://i.pinimg.com/originals/1a/fc/4a/1afc4a179ba633203fbed7d826c92c1f.gif");
|
||||
this.database.mainDAO().insert(flashcard3);
|
||||
Flashcard flashcard4 = new Flashcard(4, "Lobster", "https://i.gifer.com/KOG.gif");
|
||||
this.database.mainDAO().insert(flashcard4);
|
||||
Flashcard flashcard5 = new Flashcard(5, "Fancy", "https://i.gifer.com/Muuf.gif");
|
||||
this.database.mainDAO().insert(flashcard5);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.example.flashsign;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.example.flashsign.Database.RoomDB;
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
|
||||
public class FlashcardCreateActivity extends AppCompatActivity {
|
||||
|
||||
EditText editText_word, editText_gifUrl;
|
||||
MaterialCardView button_save;
|
||||
ImageView button_delete;
|
||||
Flashcard flashcard;
|
||||
boolean isOldFlashcard = false;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.flashcard_create_activity);
|
||||
|
||||
editText_word = findViewById(R.id.editText_word);
|
||||
editText_gifUrl = findViewById(R.id.editText_gifUrl);
|
||||
button_save = findViewById(R.id.button_save);
|
||||
button_delete = findViewById(R.id.button_delete);
|
||||
ImageView imageView_gif;
|
||||
imageView_gif = findViewById(R.id.imageView_gif);
|
||||
|
||||
flashcard = new Flashcard();
|
||||
|
||||
Glide.with(FlashcardCreateActivity.this).applyDefaultRequestOptions(new RequestOptions()
|
||||
.placeholder(R.drawable.error).
|
||||
error(R.drawable.error))
|
||||
.load(flashcard.getGifUrl())
|
||||
.into(imageView_gif);
|
||||
try {
|
||||
flashcard = (Flashcard) getIntent().getSerializableExtra("old_flashcard");
|
||||
editText_word.setText(flashcard.getWord());
|
||||
editText_gifUrl.setText(flashcard.getGifUrl());
|
||||
Glide.with(FlashcardCreateActivity.this).applyDefaultRequestOptions(new RequestOptions()
|
||||
.placeholder(R.drawable.error).
|
||||
error(R.drawable.error))
|
||||
.load(flashcard.getGifUrl())
|
||||
.into(imageView_gif);
|
||||
isOldFlashcard = true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
button_save.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String word = editText_word.getText().toString();
|
||||
String gifUrl = editText_gifUrl.getText().toString();
|
||||
|
||||
if (gifUrl.isEmpty()) {
|
||||
Toast.makeText(FlashcardCreateActivity.this, "Please add Gif's url!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isOldFlashcard) {
|
||||
flashcard = new Flashcard();
|
||||
}
|
||||
|
||||
flashcard.setWord(word);
|
||||
flashcard.setGifUrl(gifUrl);
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("flashcard", flashcard);
|
||||
setResult(Activity.RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
button_delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (isOldFlashcard){
|
||||
Toast.makeText(FlashcardCreateActivity.this, "Flashcard deleted", Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("flashcard", flashcard);
|
||||
setResult(-2, intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.example.flashsign;
|
||||
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
|
||||
public interface FlashcardsClickListener {
|
||||
|
||||
void onClick(Flashcard flashcard);
|
||||
|
||||
void onLongClick(Flashcard flashcard, CardView cardView);
|
||||
}
|
134
app/src/main/java/com/example/flashsign/MainActivity.java
Normal file
@ -0,0 +1,134 @@
|
||||
package com.example.flashsign;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
|
||||
import com.example.flashsign.Adapters.FlashcardsListAdapter;
|
||||
import com.example.flashsign.Database.RoomDB;
|
||||
import com.example.flashsign.Database.TestFlashcards;
|
||||
import com.example.flashsign.Models.Flashcard;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements PopupMenu.OnMenuItemClickListener {
|
||||
|
||||
RecyclerView recyclerView;
|
||||
FlashcardsListAdapter flashcardsListAdapter;
|
||||
List<Flashcard> flashcardList = new ArrayList<>();
|
||||
RoomDB database;
|
||||
FloatingActionButton fab_add;
|
||||
Flashcard selectedNote;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
recyclerView = findViewById(R.id.recycler_home);
|
||||
fab_add = findViewById(R.id.fab_add);
|
||||
|
||||
database = RoomDB.getInstance(this);
|
||||
TestFlashcards testFlashcards = new TestFlashcards(database);
|
||||
flashcardList = database.mainDAO().getAll();
|
||||
|
||||
updateRecycler(flashcardList);
|
||||
|
||||
fab_add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(MainActivity.this, FlashcardCreateActivity.class);
|
||||
startActivityForResult(intent, 101);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == 101 && resultCode == Activity.RESULT_OK) {
|
||||
assert data != null;
|
||||
Flashcard new_flashcard = (Flashcard) data.getSerializableExtra("flashcard");
|
||||
database.mainDAO().insert(new_flashcard);
|
||||
flashcardList.clear();
|
||||
flashcardList.addAll(database.mainDAO().getAll());
|
||||
flashcardsListAdapter.notifyDataSetChanged();
|
||||
} else if (requestCode == 102 && resultCode == Activity.RESULT_OK) {
|
||||
assert data != null;
|
||||
Flashcard new_flashcard = (Flashcard) data.getSerializableExtra("flashcard");
|
||||
database.mainDAO().update(new_flashcard.getID(), new_flashcard.getWord(),
|
||||
new_flashcard.getGifUrl());
|
||||
flashcardList.clear();
|
||||
flashcardList.addAll(database.mainDAO().getAll());
|
||||
flashcardsListAdapter.notifyDataSetChanged();
|
||||
} else if (requestCode == 102 && resultCode == -2) {
|
||||
assert data != null;
|
||||
Flashcard new_flashcard = (Flashcard) data.getSerializableExtra("flashcard");
|
||||
database.mainDAO().delete(new_flashcard);
|
||||
flashcardList.clear();
|
||||
flashcardList.addAll(database.mainDAO().getAll());
|
||||
flashcardsListAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRecycler(List<Flashcard> flashcardList) {
|
||||
|
||||
recyclerView.setHasFixedSize(true);
|
||||
recyclerView.setLayoutManager(new StaggeredGridLayoutManager(1, LinearLayoutManager.VERTICAL));
|
||||
flashcardsListAdapter = new FlashcardsListAdapter(MainActivity.this, flashcardList, flashcardsClickListener);
|
||||
recyclerView.setAdapter(flashcardsListAdapter);
|
||||
|
||||
}
|
||||
|
||||
private final FlashcardsClickListener flashcardsClickListener = new FlashcardsClickListener() {
|
||||
@Override
|
||||
public void onClick(Flashcard flashcard) {
|
||||
Intent intent = new Intent(MainActivity.this, FlashcardCreateActivity.class);
|
||||
intent.putExtra("old_flashcard", flashcard);
|
||||
startActivityForResult(intent, 102);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongClick(Flashcard flashcard, CardView cardView) {
|
||||
selectedNote = flashcard;
|
||||
showPopup(cardView);
|
||||
}
|
||||
};
|
||||
|
||||
private void showPopup(CardView cardView) {
|
||||
PopupMenu popupMenu = new PopupMenu(this, cardView);
|
||||
popupMenu.setOnMenuItemClickListener(this);
|
||||
popupMenu.inflate(R.menu.popup_menu);
|
||||
popupMenu.show();
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
if (menuItem.getItemId() == R.id.delete) {
|
||||
database.mainDAO().delete(selectedNote);
|
||||
flashcardList.remove(selectedNote);
|
||||
flashcardsListAdapter.notifyDataSetChanged();
|
||||
Toast.makeText(MainActivity.this, "Flashcard deleted", Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.example.flashsign.Models;
|
||||
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Entity(tableName = "flashcards")
|
||||
public class Flashcard implements Serializable {
|
||||
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
int ID = 0;
|
||||
|
||||
@ColumnInfo(name = "word")
|
||||
String word = "";
|
||||
|
||||
@ColumnInfo(name = "gifUrl")
|
||||
String gifUrl = "";
|
||||
|
||||
@ColumnInfo(name = "level")
|
||||
int level = 0;
|
||||
|
||||
public Flashcard() {
|
||||
|
||||
};
|
||||
|
||||
public Flashcard(int id, String word, String gifUrl) {
|
||||
this.ID = id;
|
||||
this.word = word;
|
||||
this.gifUrl = gifUrl;
|
||||
}
|
||||
|
||||
public int getID() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
public void setID(int ID) {
|
||||
this.ID = ID;
|
||||
}
|
||||
|
||||
public String getWord() {
|
||||
return word;
|
||||
}
|
||||
|
||||
public void setWord(String word) {
|
||||
this.word = word;
|
||||
}
|
||||
|
||||
public String getGifUrl() {
|
||||
return gifUrl;
|
||||
}
|
||||
|
||||
public void setGifUrl(String gifUrl) {
|
||||
this.gifUrl = gifUrl;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
}
|
30
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
104
app/src/main/res/drawable/background.xml
Normal file
@ -0,0 +1,104 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="390dp"
|
||||
android:height="844dp"
|
||||
android:viewportWidth="390"
|
||||
android:viewportHeight="844">
|
||||
<group>
|
||||
<path
|
||||
android:pathData="M195 625.94c0 19.1-16.34 34.58-36.5 34.58S122 645.03 122 625.94c0-19.1 16.34-34.58 36.5-34.58s36.5 15.48 36.5 34.58Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:gradientRadius="1">
|
||||
<item
|
||||
android:color="#FFD1A1F4"
|
||||
android:offset="0"/>
|
||||
<item
|
||||
android:color="#FF6B10B1"
|
||||
android:offset="1"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
<group>
|
||||
<path
|
||||
android:pathData="M183.17 113.44c0 79.21-63.27 143.43-141.31 143.43-78.05 0-141.32-64.22-141.32-143.43C-99.46 34.22-36.19-30 41.86-30c78.04 0 141.31 64.22 141.31 143.44Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:gradientRadius="1">
|
||||
<item
|
||||
android:color="#FF99BFF5"
|
||||
android:offset="0"/>
|
||||
<item
|
||||
android:color="#99BFF5"
|
||||
android:offset="1"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
<group/>
|
||||
<group>
|
||||
<path
|
||||
android:pathData="M178.92 701.36c0 75.61-63.34 136.9-141.46 136.9-78.13 0-141.46-61.29-141.46-136.9 0-75.6 63.33-136.9 141.46-136.9 78.12 0 141.46 61.3 141.46 136.9Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:gradientRadius="1">
|
||||
<item
|
||||
android:color="#FFA5EAEC"
|
||||
android:offset="0"/>
|
||||
<item
|
||||
android:color="#FFA5EAEC"
|
||||
android:offset="1"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
<group>
|
||||
<path
|
||||
android:fillAlpha="0.5"
|
||||
android:pathData="M604 273.6c0 75.61-63.33 136.9-141.46 136.9-78.12 0-141.46-61.29-141.46-136.9 0-75.6 63.34-136.9 141.46-136.9C540.67 136.7 604 198 604 273.6Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:gradientRadius="1">
|
||||
<item
|
||||
android:color="#FF99BFF5"
|
||||
android:offset="0"/>
|
||||
<item
|
||||
android:color="#FF99BFF5"
|
||||
android:offset="1"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
<group>
|
||||
<path
|
||||
android:pathData="M294.4 853.56c0 79.22-63.26 143.44-141.3 143.44-78.05 0-141.32-64.22-141.32-143.44 0-79.21 63.27-143.43 141.31-143.43 78.05 0 141.32 64.22 141.32 143.43Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:gradientRadius="1">
|
||||
<item
|
||||
android:color="#D1A1F4"
|
||||
android:offset="0"/>
|
||||
<item
|
||||
android:color="#D1A1F4"
|
||||
android:offset="1"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
</vector>
|
12
app/src/main/res/drawable/blur.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:drawable="@drawable/background" /> <!-- change @drawable/nature with your desired image -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
|
||||
<!-- You can use from 1% transparency to 100% transparency, according to your need,-->
|
||||
<solid
|
||||
android:color="#57FFFFFF"/> <!-- Here transparency level is 80%-->
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
9
app/src/main/res/drawable/button_bg.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient android:startColor="@color/white"
|
||||
android:endColor="@color/lilic"
|
||||
android:angle="1" />
|
||||
<corners android:radius="15dp" />
|
||||
<stroke android:width="10px" android:color="@color/lilic" />
|
||||
</shape>
|
5
app/src/main/res/drawable/delete.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#646464"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
|
||||
</vector>
|
33
app/src/main/res/drawable/error.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="119dp"
|
||||
android:height="119dp"
|
||||
android:viewportWidth="119"
|
||||
android:viewportHeight="119">
|
||||
<path
|
||||
android:strokeColor="#FF9C4ED8"
|
||||
android:strokeWidth="0.35"
|
||||
android:pathData="M0.17 10.49c0-2.74 1.09-5.36 3.02-7.3 1.94-1.94 4.56-3.02 7.3-3.02h98.01c5.7 0 10.32 4.62 10.32 10.32v98.01c0 5.7-4.62 10.32-10.32 10.32h-98.01c-5.7 0-10.32-4.62-10.32-10.32z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:startX="59.5"
|
||||
android:startY="0"
|
||||
android:endX="59.5"
|
||||
android:endY="119">
|
||||
<item
|
||||
android:color="#8CFDFDFD"
|
||||
android:offset="0.41"/>
|
||||
<item
|
||||
android:color="#FFD1A1F4"
|
||||
android:offset="1"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M57.53 64.65c-1.15 0-2.12-0.2-2.91-0.63-0.79-0.42-1.39-1-1.8-1.76-0.4-0.76-0.6-1.64-0.6-2.65 0-1.04 0.22-1.95 0.66-2.71 0.45-0.78 1.09-1.37 1.92-1.8 0.83-0.41 1.83-0.62 3-0.62 0.71 0 1.35 0.08 1.9 0.25 0.56 0.17 1.04 0.4 1.44 0.73l-0.8 1.97c-0.29-0.2-0.56-0.35-0.82-0.45-0.26-0.11-0.52-0.19-0.79-0.24-0.26-0.04-0.56-0.07-0.9-0.07-0.98 0-1.7 0.26-2.2 0.76-0.47 0.5-0.7 1.22-0.7 2.18 0 0.96 0.21 1.67 0.65 2.16 0.44 0.49 1.14 0.73 2.09 0.73 0.29 0 0.6-0.03 0.94-0.09 0.34-0.05 0.7-0.14 1.05-0.25l-0.47 0.93v-2.36h-2.04v-1.79h4.16v4.94c-0.53 0.26-1.13 0.45-1.8 0.58-0.65 0.13-1.31 0.2-1.98 0.2Zm5.32-0.15v-7.11h2.49v7.11h-2.5Zm-0.06-8.12v-2.24h2.62v2.24h-2.62Zm4.7 8.12v-5.28h-1.34V57.4h2.03l-0.7 0.64v-0.96c0-0.98 0.26-1.72 0.77-2.2 0.52-0.49 1.3-0.73 2.33-0.73 0.23 0 0.48 0.01 0.74 0.04s0.5 0.09 0.7 0.17v1.9c-0.13-0.04-0.28-0.08-0.45-0.1-0.17-0.02-0.33-0.04-0.49-0.04-0.19 0-0.37 0.04-0.54 0.1-0.17 0.06-0.31 0.16-0.42 0.31-0.1 0.15-0.16 0.35-0.16 0.62v0.63l-0.35-0.38h2.07v1.83h-1.7v5.28h-2.5Z"/>
|
||||
<path
|
||||
android:fillColor="#FF9C4ED8"
|
||||
android:pathData="M54.62 64.02l-0.17 0.31 0.17-0.3Zm-1.8-1.76l-0.3 0.16 0.3-0.16Zm0.06-5.36l-0.3-0.18 0.3 0.18Zm1.92-1.8l0.16 0.32-0.16-0.31Zm4.9-0.37l-0.1 0.33 0.1-0.33Zm1.44 0.73l0.32 0.13 0.1-0.25-0.2-0.16-0.22 0.28Zm-0.8 1.97l-0.2 0.29 0.36 0.24 0.17-0.4-0.33-0.13Zm-0.82-0.45l-0.15 0.32h0.01l0.14-0.32Zm-0.79-0.24l-0.06 0.35 0.06-0.35Zm-3.1 0.69l-0.24-0.24 0.25 0.24Zm-0.05 4.34l0.26-0.23-0.26 0.23Zm3.03 0.64l-0.06-0.34 0.06 0.34Zm1.05-0.25l0.3 0.16 0.38-0.74-0.79 0.25 0.1 0.33Zm-0.47 0.93h-0.35l0.67 0.15-0.32-0.15Zm0-2.36h0.35v-0.35H59.2v0.35Zm-2.04 0H56.8v0.35h0.35v-0.35Zm0-1.79V58.6H56.8v0.35h0.35Zm4.16 0h0.35V58.6H61.3v0.35Zm0 4.94l0.15 0.32 0.2-0.1v-0.22H61.3Zm-1.8 0.58l-0.06-0.35 0.07 0.35Zm-1.98-0.16c-1.1 0-2.02-0.2-2.75-0.59l-0.33 0.62C55.31 64.8 56.34 65 57.53 65v-0.7Zm-2.75-0.58c-0.72-0.4-1.27-0.93-1.65-1.63l-0.61 0.34c0.44 0.82 1.09 1.45 1.93 1.9l0.33-0.61Zm-1.65-1.62c-0.37-0.7-0.56-1.53-0.56-2.49h-0.7c0 1.06 0.21 2 0.64 2.81l0.62-0.32Zm-0.56-2.49c0-1 0.21-1.83 0.61-2.54l-0.6-0.35c-0.48 0.83-0.7 1.8-0.7 2.9h0.7Zm0.61-2.54c0.42-0.71 1-1.26 1.78-1.65l-0.32-0.63c-0.89 0.45-1.58 1.1-2.06 1.93l0.6 0.35Zm1.78-1.65c0.77-0.4 1.7-0.6 2.83-0.6v-0.7c-1.2 0-2.26 0.22-3.15 0.67l0.32 0.63Zm2.83-0.6c0.7 0 1.3 0.09 1.8 0.24l0.21-0.67c-0.6-0.18-1.26-0.26-2-0.26v0.7Zm1.8 0.24c0.53 0.16 0.97 0.38 1.33 0.67l0.44-0.55c-0.44-0.35-0.97-0.6-1.56-0.79l-0.2 0.67Zm1.23 0.26l-0.8 1.98 0.65 0.26 0.8-1.97-0.65-0.27Zm-0.28 1.82c-0.3-0.2-0.6-0.37-0.9-0.48L59.4 57.3c0.23 0.09 0.48 0.22 0.76 0.41l0.39-0.58Zm-0.88-0.48c-0.28-0.12-0.57-0.2-0.87-0.26l-0.12 0.69c0.24 0.04 0.48 0.11 0.7 0.21l0.29-0.64Zm-0.87-0.26c-0.28-0.05-0.6-0.08-0.97-0.08v0.7c0.33 0 0.61 0.03 0.85 0.07l0.12-0.7Zm-0.97-0.08c-1.03 0-1.86 0.27-2.43 0.87l0.5 0.48c0.4-0.41 1.02-0.65 1.93-0.65v-0.7ZM55.4 57.2c-0.56 0.58-0.82 1.4-0.82 2.42h0.7c0-0.9 0.23-1.53 0.62-1.94l-0.5-0.48Zm-0.82 2.42c0 1 0.23 1.82 0.75 2.4l0.52-0.47c-0.36-0.4-0.57-1.02-0.57-1.93h-0.7Zm0.75 2.4c0.53 0.58 1.34 0.84 2.35 0.84v-0.7c-0.9 0-1.48-0.23-1.83-0.61L55.32 62Zm2.35 0.84c0.31 0 0.64-0.03 1-0.1l-0.12-0.68c-0.32 0.05-0.61 0.08-0.88 0.08v0.7Zm1-0.09c0.35-0.06 0.72-0.15 1.1-0.26l-0.22-0.67c-0.34 0.1-0.67 0.19-1 0.24l0.11 0.69Zm0.67-0.75l-0.46 0.92 0.63 0.31 0.46-0.92L59.34 62Zm0.2 1.08v-2.36h-0.7v2.36h0.7Zm-0.35-2.7h-2.04v0.7h2.04v-0.7Zm-1.69 0.34v-1.79h-0.7v1.8h0.7Zm-0.35-1.44h4.16v-0.7h-4.16v0.7Zm3.8-0.35v4.94h0.7v-4.94h-0.7Zm0.2 4.63c-0.5 0.24-1.06 0.42-1.7 0.54l0.13 0.7c0.7-0.14 1.32-0.34 1.88-0.61l-0.3-0.63Zm-1.7 0.54c-0.63 0.13-1.27 0.2-1.92 0.2V65c0.7 0 1.38-0.07 2.05-0.2l-0.13-0.7Zm3.4 0.39H62.5v0.35h0.35V64.5Zm0-7.11v-0.35H62.5v0.35h0.35Zm2.49 0h0.35v-0.35h-0.35v0.35Zm0 7.11v0.35h0.35V64.5h-0.35Zm-2.55-8.12h-0.35v0.35h0.35v-0.35Zm0-2.24v-0.35h-0.35v0.35h0.35Zm2.62 0h0.35v-0.35h-0.35v0.35Zm0 2.24v0.35h0.35v-0.35h-0.35ZM63.2 64.5v-7.11h-0.7v7.11h0.7Zm-0.35-6.76h2.49v-0.7h-2.5v0.7Zm2.14-0.35v7.11h0.7v-7.11h-0.7Zm0.35 6.76h-2.5v0.7h2.5v-0.7Zm-2.2-7.77v-2.24h-0.7v2.24h0.7Zm-0.35-1.89h2.62v-0.7h-2.62v0.7Zm2.27-0.35v2.24h0.7v-2.24h-0.7Zm0.35 1.89h-2.62v0.7h2.62v-0.7Zm2.07 8.47h-0.35v0.35h0.35V64.5Zm0-5.28h0.35v-0.35h-0.35v0.35Zm-1.33 0H65.8v0.35h0.35v-0.35Zm0-1.83v-0.35H65.8v0.35h0.35Zm2.03 0l0.24 0.26 0.66-0.61h-0.9v0.35Zm-0.7 0.64h-0.35v0.8l0.59-0.54-0.24-0.26Zm0.77-3.16l0.24 0.25-0.24-0.25Zm3.07-0.69l0.04-0.35-0.04 0.35Zm0.7 0.17h0.35v-0.23l-0.22-0.1-0.13 0.33Zm0 1.9l-0.12 0.33 0.47 0.17v-0.5h-0.35Zm-0.45-0.1l-0.06 0.35h0.01 0.01l0.04-0.34Zm-1.03 0.06l0.1 0.33h0.02l-0.12-0.33Zm-0.42 0.31l-0.28-0.21-0.01 0.01 0.29 0.2Zm-0.16 1.25L69.7 58l0.61 0.66v-0.9h-0.35Zm-0.35-0.38v-0.35h-0.8l0.54 0.59 0.26-0.24Zm2.07 0h0.35v-0.35h-0.35v0.35Zm0 1.83v0.35h0.35v-0.35h-0.35Zm-1.7 0v-0.35h-0.35v0.35h0.35Zm0 5.28v0.35h0.35V64.5h-0.35Zm-2.15 0v-5.28h-0.7v5.28h0.7Zm-0.35-5.63h-1.33v0.7h1.33v-0.7Zm-0.98 0.35V57.4h-0.7v1.83h0.7Zm-0.35-1.48h2.03v-0.7h-2.03v0.7Zm1.8-0.61l-0.7 0.64 0.47 0.52 0.7-0.64-0.47-0.52Zm-0.12 0.9v-0.96h-0.7v0.96h0.7Zm0-0.96c0-0.93 0.24-1.55 0.66-1.95l-0.48-0.5c-0.6 0.57-0.88 1.4-0.88 2.45h0.7Zm0.66-1.95c0.43-0.4 1.1-0.63 2.09-0.63v-0.7c-1.09 0-1.96 0.25-2.57 0.82l0.48 0.51Zm2.09-0.63c0.22 0 0.45 0.01 0.7 0.04l0.08-0.7c-0.28-0.03-0.54-0.04-0.78-0.04v0.7Zm0.7 0.04c0.24 0.03 0.44 0.07 0.6 0.14l0.27-0.64c-0.24-0.1-0.5-0.17-0.8-0.2l-0.07 0.7Zm0.39-0.18v1.9h0.7v-1.9h-0.7Zm0.47 1.57c-0.16-0.05-0.34-0.1-0.53-0.11l-0.08 0.7c0.15 0.01 0.27 0.04 0.37 0.07l0.24-0.66Zm-0.51-0.1c-0.19-0.04-0.37-0.06-0.55-0.06v0.7c0.14 0 0.28 0.02 0.43 0.04l0.12-0.69Zm-0.55-0.06c-0.23 0-0.45 0.04-0.67 0.12l0.25 0.66c0.14-0.05 0.28-0.08 0.42-0.08v-0.7Zm-0.66 0.12c-0.23 0.08-0.43 0.23-0.58 0.43l0.56 0.42c0.07-0.1 0.15-0.15 0.25-0.19l-0.23-0.66Zm-0.6 0.44c-0.15 0.23-0.2 0.51-0.2 0.82h0.7c0-0.22 0.04-0.35 0.08-0.42l-0.57-0.4Zm-0.2 0.82v0.63h0.7v-0.63h-0.7Zm0.6 0.39l-0.35-0.38-0.52 0.48L69.7 58l0.52-0.47Zm-0.6 0.2h2.06v-0.7h-2.07v0.7Zm1.71-0.34v1.83h0.7V57.4h-0.7Zm0.35 1.48h-1.7v0.7h1.7v-0.7Zm-2.05 0.35v5.28h0.7v-5.28h-0.7Zm0.35 4.93h-2.5v0.7h2.5v-0.7Z"/>
|
||||
</vector>
|
10
app/src/main/res/drawable/ic_add.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||
</vector>
|
18
app/src/main/res/drawable/ic_bottom_toolbar_button_1.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="22dp"
|
||||
android:viewportWidth="18"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M14.54 21.68H3.3c-1.74 0-3.12-1.36-3.12-3.09V3.77c0-1.73 1.38-3.09 3.12-3.09h11.24c1.74 0 3.12 1.36 3.12 3.09v14.82c0 1.73-1.38 3.09-3.12 3.09ZM3.3 1.92c-1 0-1.87 0.86-1.87 1.85v14.82c0 0.99 0.88 1.85 1.87 1.85h11.24c1 0 1.87-0.86 1.87-1.85V3.77c0-0.99-0.88-1.85-1.87-1.85H3.3Z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M12.66 6.86H5.18c-0.38 0-0.63-0.25-0.63-0.62S4.8 5.62 5.18 5.62h7.48c0.38 0 0.63 0.25 0.63 0.62s-0.25 0.62-0.63 0.62Z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M12.66 11.8H5.18c-0.38 0-0.63-0.25-0.63-0.62s0.25-0.62 0.63-0.62h7.48c0.38 0 0.63 0.25 0.63 0.62s-0.25 0.62-0.63 0.62Z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M12.66 16.74H5.18c-0.38 0-0.63-0.25-0.63-0.62S4.8 15.5 5.18 15.5h7.48c0.38 0 0.63 0.25 0.63 0.62s-0.25 0.62-0.63 0.62Z"/>
|
||||
</vector>
|
12
app/src/main/res/drawable/ic_bottom_toolbar_button_2.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="26dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="26"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M21.04 19.48H5.12c-1.06 0-1.99-0.92-1.99-1.97v-6.56c0-0.4-0.26-0.66-0.66-0.66H1.15c-0.27 0-0.53-0.13-0.67-0.4-0.13-0.25 0-0.52 0.27-0.78l11.14-8.53c0.66-0.53 1.72-0.53 2.38 0l11.14 8.53c0.27 0.13 0.27 0.53 0.27 0.79-0.14 0.26-0.4 0.4-0.67 0.4H23.7c-0.4 0-0.67 0.25-0.67 0.65v6.56c0 1.05-0.92 1.97-1.98 1.97ZM3 8.98c0.8 0.26 1.46 1.05 1.46 1.84v6.56c0 0.4 0.27 0.65 0.66 0.65h15.92c0.4 0 0.66-0.26 0.66-0.65v-6.56c0-0.92 0.66-1.71 1.46-1.84L13.48 1.5c-0.27-0.13-0.53-0.13-0.8 0L3 8.98Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15.07 18.82v-6.56c0-0.4-0.27-0.66-0.66-0.66h-2.66c-0.4 0-0.66 0.27-0.66 0.66v6.56H9.76v-6.56c0-1.05 0.93-1.97 2-1.97h2.65c1.06 0 1.98 0.92 1.98 1.97v6.56h-1.32Z"/>
|
||||
</vector>
|
15
app/src/main/res/drawable/ic_bottom_toolbar_button_3.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="17dp"
|
||||
android:height="21dp"
|
||||
android:viewportWidth="17"
|
||||
android:viewportHeight="21">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M8.41 11.92c-2.75 0-5-2.47-5-5.56 0-3.09 2.25-5.56 5-5.56s5 2.47 5 5.56c0 3.09-2.25 5.56-5 5.56Zm0-9.88c-2.12 0-3.74 1.98-3.74 4.32 0 2.35 1.62 4.33 3.74 4.33s3.74-1.98 3.74-4.33c0-2.34-1.62-4.32-3.74-4.32Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15.9 20.32c-0.38 0-0.63-0.25-0.63-0.62v-4.2c0-2.34-1.87-4.2-4.24-4.2h-0.37c-0.38 0-0.63-0.24-0.63-0.61 0-0.38 0.25-0.62 0.63-0.62h0.5c3 0 5.49 2.47 5.49 5.43v4.2c-0.13 0.37-0.38 0.62-0.75 0.62Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M0.92 20.32c-0.37 0-0.62-0.25-0.62-0.62v-4.2c0-2.96 2.5-5.43 5.49-5.43h0.5c0.37 0 0.62 0.24 0.62 0.62 0 0.37-0.25 0.61-0.62 0.61h-0.5c-2.37 0-4.24 1.86-4.24 4.2v4.2c0 0.37-0.25 0.62-0.63 0.62Z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_fingerprint.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M17.81,4.47c-0.08,0 -0.16,-0.02 -0.23,-0.06C15.66,3.42 14,3 12.01,3c-1.98,0 -3.86,0.47 -5.57,1.41 -0.24,0.13 -0.54,0.04 -0.68,-0.2 -0.13,-0.24 -0.04,-0.55 0.2,-0.68C7.82,2.52 9.86,2 12.01,2c2.13,0 3.99,0.47 6.03,1.52 0.25,0.13 0.34,0.43 0.21,0.67 -0.09,0.18 -0.26,0.28 -0.44,0.28zM3.5,9.72c-0.1,0 -0.2,-0.03 -0.29,-0.09 -0.23,-0.16 -0.28,-0.47 -0.12,-0.7 0.99,-1.4 2.25,-2.5 3.75,-3.27C9.98,4.04 14,4.03 17.15,5.65c1.5,0.77 2.76,1.86 3.75,3.25 0.16,0.22 0.11,0.54 -0.12,0.7 -0.23,0.16 -0.54,0.11 -0.7,-0.12 -0.9,-1.26 -2.04,-2.25 -3.39,-2.94 -2.87,-1.47 -6.54,-1.47 -9.4,0.01 -1.36,0.7 -2.5,1.7 -3.4,2.96 -0.08,0.14 -0.23,0.21 -0.39,0.21zM9.75,21.79c-0.13,0 -0.26,-0.05 -0.35,-0.15 -0.87,-0.87 -1.34,-1.43 -2.01,-2.64 -0.69,-1.23 -1.05,-2.73 -1.05,-4.34 0,-2.97 2.54,-5.39 5.66,-5.39s5.66,2.42 5.66,5.39c0,0.28 -0.22,0.5 -0.5,0.5s-0.5,-0.22 -0.5,-0.5c0,-2.42 -2.09,-4.39 -4.66,-4.39 -2.57,0 -4.66,1.97 -4.66,4.39 0,1.44 0.32,2.77 0.93,3.85 0.64,1.15 1.08,1.64 1.85,2.42 0.19,0.2 0.19,0.51 0,0.71 -0.11,0.1 -0.24,0.15 -0.37,0.15zM16.92,19.94c-1.19,0 -2.24,-0.3 -3.1,-0.89 -1.49,-1.01 -2.38,-2.65 -2.38,-4.39 0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5c0,1.41 0.72,2.74 1.94,3.56 0.71,0.48 1.54,0.71 2.54,0.71 0.24,0 0.64,-0.03 1.04,-0.1 0.27,-0.05 0.53,0.13 0.58,0.41 0.05,0.27 -0.13,0.53 -0.41,0.58 -0.57,0.11 -1.07,0.12 -1.21,0.12zM14.91,22c-0.04,0 -0.09,-0.01 -0.13,-0.02 -1.59,-0.44 -2.63,-1.03 -3.72,-2.1 -1.4,-1.39 -2.17,-3.24 -2.17,-5.22 0,-1.62 1.38,-2.94 3.08,-2.94 1.7,0 3.08,1.32 3.08,2.94 0,1.07 0.93,1.94 2.08,1.94s2.08,-0.87 2.08,-1.94c0,-3.77 -3.25,-6.83 -7.25,-6.83 -2.84,0 -5.44,1.58 -6.61,4.03 -0.39,0.81 -0.59,1.76 -0.59,2.8 0,0.78 0.07,2.01 0.67,3.61 0.1,0.26 -0.03,0.55 -0.29,0.64 -0.26,0.1 -0.55,-0.04 -0.64,-0.29 -0.49,-1.31 -0.73,-2.61 -0.73,-3.96 0,-1.2 0.23,-2.29 0.68,-3.24 1.33,-2.79 4.28,-4.6 7.51,-4.6 4.55,0 8.25,3.51 8.25,7.83 0,1.62 -1.38,2.94 -3.08,2.94s-3.08,-1.32 -3.08,-2.94c0,-1.07 -0.93,-1.94 -2.08,-1.94s-2.08,0.87 -2.08,1.94c0,1.71 0.66,3.31 1.87,4.51 0.95,0.94 1.86,1.46 3.27,1.85 0.27,0.07 0.42,0.35 0.35,0.61 -0.05,0.23 -0.26,0.38 -0.47,0.38z"/>
|
||||
</vector>
|
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
15
app/src/main/res/drawable/ic_menu.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="37dp"
|
||||
android:height="37dp"
|
||||
android:viewportWidth="37"
|
||||
android:viewportHeight="37">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M24.05 14.8h-11.1c-0.28 0-0.46-0.19-0.46-0.46 0-0.28 0.18-0.46 0.46-0.46h11.1c0.28 0 0.46 0.18 0.46 0.46s-0.18 0.46-0.46 0.46Z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M24.05 18.96h-11.1c-0.28 0-0.46-0.18-0.46-0.46s0.18-0.46 0.46-0.46h11.1c0.28 0 0.46 0.18 0.46 0.46s-0.18 0.46-0.46 0.46Z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M24.05 23.13h-11.1c-0.28 0-0.46-0.19-0.46-0.47 0-0.27 0.18-0.46 0.46-0.46h11.1c0.28 0 0.46 0.19 0.46 0.46 0 0.28-0.18 0.46-0.46 0.46Z"/>
|
||||
</vector>
|
11
app/src/main/res/drawable/ic_pin.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16,9V4l1,0c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3v0c0,0.55 0.45,1 1,1l1,0v5c0,1.66 -1.34,3 -3,3h0v2h5.97v7l1,1l1,-1v-7H19v-2h0C17.34,12 16,10.66 16,9z"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_save.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/black" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
|
||||
</vector>
|
BIN
app/src/main/res/drawable/user_avatar.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
141
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
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_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/background"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/toolbar_flashcards"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:liftOnScroll="true">
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:src="@drawable/user_avatar"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="User"
|
||||
android:padding="15dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"/>
|
||||
<ImageView
|
||||
android:id="@+id/menu_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:src="@drawable/ic_menu"/>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/toolbar_flashcards"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:padding="15dp"
|
||||
android:singleLine="true"
|
||||
android:text="Category name"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/category_name" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/bottom_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/home"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="false"
|
||||
android:src="@drawable/ic_bottom_toolbar_button_2"
|
||||
app:borderWidth="5dp"
|
||||
android:backgroundTint="@color/lilic"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:tint="@color/white"
|
||||
app:backgroundTint="@color/white"
|
||||
app:elevation="4dp"
|
||||
android:elevation="0dp"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_margin="15dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="100dp"
|
||||
app:cardElevation="4dp" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:elevation="0dp"
|
||||
android:src="@drawable/ic_bottom_toolbar_button_1"
|
||||
app:backgroundTint="@color/white"
|
||||
app:elevation="4dp" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:elevation="0dp"
|
||||
android:src="@drawable/ic_bottom_toolbar_button_3"
|
||||
app:backgroundTint="@color/white"
|
||||
app:elevation="4dp" />
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
41
app/src/main/res/layout/categories_list.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/transparent"
|
||||
app:strokeColor="@color/lilic"
|
||||
app:strokeWidth="1.5dp"
|
||||
android:id="@+id/notes_container"
|
||||
app:cardCornerRadius="10.5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="30dp"
|
||||
android:layout_marginVertical="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="4">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_gif"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitXY"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_word"
|
||||
android:layout_weight="3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
146
app/src/main/res/layout/flashcard_create_activity.xml
Normal file
@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/background"
|
||||
android:orientation="vertical"
|
||||
tools:context=".FlashcardCreateActivity">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar_flashcards"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:text="Edit flashcard"
|
||||
android:padding="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/button_save"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_toLeftOf="@+id/button_delete"
|
||||
app:cardBackgroundColor="@color/lilic"
|
||||
app:cardCornerRadius="100dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:layout_marginVertical="5dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Save"
|
||||
android:padding="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"/>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<ImageView
|
||||
android:id="@+id/button_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:src="@drawable/delete"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeColor="@color/lilic"
|
||||
app:strokeWidth="2.5dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_weight="3">
|
||||
<ImageView
|
||||
android:id="@+id/imageView_gif"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"/>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeColor="@color/lilic"
|
||||
app:strokeWidth="2.5dp"
|
||||
app:cardCornerRadius="100dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp">
|
||||
<EditText
|
||||
android:id="@+id/editText_word"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginVertical="7.5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="Word"
|
||||
android:padding="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="normal" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeColor="@color/lilic"
|
||||
app:strokeWidth="2.5dp"
|
||||
app:cardCornerRadius="100dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<EditText
|
||||
android:id="@+id/editText_gifUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginVertical="7.5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="Gif's url"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="normal" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
41
app/src/main/res/layout/flashcards_list.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/transparent"
|
||||
app:strokeColor="@color/lilic"
|
||||
app:strokeWidth="1.5dp"
|
||||
android:id="@+id/notes_container"
|
||||
app:cardCornerRadius="10.5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="30dp"
|
||||
android:layout_marginVertical="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="4">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_gif"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitXY"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_word"
|
||||
android:layout_weight="3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
5
app/src/main/res/menu/popup_menu.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/delete"
|
||||
android:title="Delete"/>
|
||||
</menu>
|
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 7.6 KiB |
30
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.FlashSign" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/transparent</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.FlashSign.NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/transparent</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
19
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="grey">#242B2E</color>
|
||||
|
||||
|
||||
<color name="lilic">#9C4ED8</color>
|
||||
|
||||
<color name="transparent">#00FFFFFF</color>
|
||||
|
||||
|
||||
|
||||
</resources>
|
3
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">FlashSign</string>
|
||||
</resources>
|
30
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.FlashSign" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/transparent</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.FlashSign.NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/transparent</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
9
build.gradle
Normal file
@ -0,0 +1,9 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '7.1.2' apply false
|
||||
id 'com.android.library' version '7.1.2' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
21
gradle.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app"s APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Mon Jun 20 15:46:47 CEST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
185
gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
89
gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
16
settings.gradle
Normal file
@ -0,0 +1,16 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
rootProject.name = "FlashSign"
|
||||
include ':app'
|