Skip to content

Instantly share code, notes, and snippets.

View Raf0707's full-sized avatar
🏠
Working from home

Rafail Raf0707

🏠
Working from home
View GitHub Profile
package pize.graphics.entities;
public class Player implements Person {
public String name;
public String nick;
public int minDamage;
public int maxDamage;
public int damage;
public int hp;
@Raf0707
Raf0707 / CounterLetter.java
Created August 7, 2023 23:12
CounterLetter
import java.util.HashMap;
import java.util.Scanner;
public class CounterLetter {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String word = sc.nextLine();
HashMap<Character, Integer> counter = new HashMap<>();
@Raf0707
Raf0707 / MainActivityPlayer.java
Created September 7, 2023 16:25
MyPlayer MainActivity
import androidx.appcompat.app.AppCompatActivity;
import android.Manifest;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.ListView;
<resources
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Counters" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/md_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_light_secondary</item>
<resources
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Base application theme. -->
<style name="Theme.Counters" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
@Raf0707
Raf0707 / MainActivity.java
Created May 9, 2024 19:58
MainActivity_QT
package raf.tabiin.qurantajweed;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
private String getSuraTitle(int page) {
switch (page) {
case 1:
return "Сура 1. Аль-Фатиха - Открывающая";
case 2: case 3: case 4: case 5: case 6:
case 7: case 8: case 9: case 10: case 11:
case 12: case 13: case 14: case 15: case 16:
case 17: case 18: case 19: case 20: case 21:
case 22: case 23: case 24: case 25: case 26:
case 27: case 28: case 29: case 30: case 31:
@Raf0707
Raf0707 / MyMediaPlayer
Created May 13, 2024 14:25
MyMediaPlayer
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.widget.ImageButton;
import android.widget.SeekBar;
import androidx.recyclerview.widget.RecyclerView;
import java.io.IOException;
@Raf0707
Raf0707 / StandartMediaPlayer
Created May 13, 2024 14:25
StandartMediaPlayer
import android.media.MediaPlayer;
public class StandartMediaPlayer {
private MediaPlayer mediaPlayer;
private int currentPosition;
static MediaPlayer instance;
public StandartMediaPlayer() {
mediaPlayer = new MediaPlayer();
@Raf0707
Raf0707 / Food
Created May 22, 2024 00:23
Food
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".ui.main.vocabulary.FoodActivity">
<TableLayout