Compare commits

...

2 Commits

Author SHA1 Message Date
JG-Cody
30f1dc118c funzt wieder 2024-02-25 18:44:29 +01:00
JG-Cody
8ef4ab761d openinganimation now works again...
destroyed everything else...
2024-02-25 12:26:54 +01:00
34 changed files with 26 additions and 60 deletions

View File

@ -7,11 +7,11 @@
<deviceKey> <deviceKey>
<Key> <Key>
<type value="VIRTUAL_DEVICE_PATH" /> <type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\Cody\.android\avd\Pixel_C_API_33.avd" /> <value value="C:\Users\Cody\.android\avd\for_Website.avd" />
</Key> </Key>
</deviceKey> </deviceKey>
</Target> </Target>
</targetSelectedWithDropDown> </targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-02-24T17:39:55.956737900Z" /> <timeTargetWasSelectedWithDropDown value="2024-02-25T16:19:56.097941500Z" />
</component> </component>
</project> </project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

View File

@ -1,13 +1,9 @@
package com.example.onetap_ssh; package com.example.onetap_ssh;
import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.media.MediaPlayer; import android.media.MediaPlayer;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Toast; import android.widget.Toast;
@ -17,8 +13,6 @@ import com.example.onetap_ssh.util.SettingsUtil;
public class IntroActivity extends BaseActivity { public class IntroActivity extends BaseActivity {
public static boolean show_logoanimation = false;
private ActivityIntroBinding binding; private ActivityIntroBinding binding;
private MediaPlayer mMediaPlayer; private MediaPlayer mMediaPlayer;
@ -52,26 +46,6 @@ public class IntroActivity extends BaseActivity {
}); });
setContentView(binding.getRoot()); setContentView(binding.getRoot());
SharedPreferences p = getSharedPreferences("appsettings", Activity.MODE_PRIVATE);
show_logoanimation = p.getBoolean("Logoanimation", true);
if (show_logoanimation) {
setContentView(R.layout.activity_intro);
final Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Do something after 4000ms
Intent m = new Intent(getApplicationContext(), MainActivity.class);
m.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(m);
}
}, 4000);
} else {
Intent m = new Intent(getApplicationContext(), MainActivity.class);
m.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(m);
}
} }
public void openMainActivity() { public void openMainActivity() {

View File

@ -50,11 +50,10 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.UUID; import java.util.UUID;
public class MainActivity extends AppCompatActivity { public class MainActivity extends BaseActivity {
private AppBarConfiguration mAppBarConfiguration; private AppBarConfiguration mAppBarConfiguration;
private ActivityMainBinding binding; private ActivityMainBinding binding;
private boolean fullyLaunched; private boolean fullyLaunched;
public static boolean button_vibration = false; public static boolean button_vibration = false;
private boolean lockOnStop = true; private boolean lockOnStop = true;
@ -91,8 +90,8 @@ public class MainActivity extends AppCompatActivity {
NavigationUI.setupWithNavController(navigationView, navController); NavigationUI.setupWithNavController(navigationView, navController);
SharedPreferences p = getSharedPreferences("appsettings", Activity.MODE_PRIVATE); SharedPreferences p = getSharedPreferences("appsettings", Activity.MODE_PRIVATE);
button_vibration = p.getBoolean("Vibration", false ); button_vibration = p.getBoolean("Vibration", false );
IntroActivity.show_logoanimation = p.getBoolean("Logoanimation", true );
launchApp(); //launchApp();
navigationView.getMenu().getItem(4).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { navigationView.getMenu().getItem(4).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override @Override

View File

@ -223,7 +223,6 @@ public class HomeFragment extends Fragment {
passwordInput.setVisibility(View.VISIBLE); passwordInput.setVisibility(View.VISIBLE);
reboot_Button.setVisibility(View.GONE); reboot_Button.setVisibility(View.GONE);
shutdown_Button.setVisibility(View.GONE); shutdown_Button.setVisibility(View.GONE);
backgroundoverlay_bottom.setVisibility(View.INVISIBLE);
} else { } else {
logoutButton.setVisibility(View.VISIBLE); logoutButton.setVisibility(View.VISIBLE);
reboot_Button.setVisibility(View.VISIBLE); reboot_Button.setVisibility(View.VISIBLE);

View File

@ -17,7 +17,7 @@ public class ThemeUtil {
activity.setTheme(theme.getStyle()); activity.setTheme(theme.getStyle());
if(SettingsUtil.isMinimalistThemeEnabled(activity)) { if(SettingsUtil.isMinimalistThemeEnabled(activity)) {
activity.getTheme().applyStyle(R.style.Theme_CringeAuthenticator_Minimalist, true); activity.getTheme().applyStyle(R.style.Theme_OneTap_SSH_Minimalist, true);
} }
AppCompatDelegate.setDefaultNightMode(SettingsUtil.getAppearance(activity).getValue()); AppCompatDelegate.setDefaultNightMode(SettingsUtil.getAppearance(activity).getValue());

View File

@ -45,6 +45,8 @@
android:background="#80FFFFFF" android:background="#80FFFFFF"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/background_red_blue" android:src="@drawable/background_red_blue"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
@ -88,6 +90,8 @@
android:ems="10" android:ems="10"
android:hint="@string/login_ipaddress" android:hint="@string/login_ipaddress"
android:inputType="text" android:inputType="text"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintEnd_toEndOf="@+id/text_home" app:layout_constraintEnd_toEndOf="@+id/text_home"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/text_home" app:layout_constraintStart_toStartOf="@+id/text_home"
@ -102,6 +106,8 @@
android:hint="@string/login_username" android:hint="@string/login_username"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:singleLine="false" android:singleLine="false"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintEnd_toEndOf="@+id/text_home" app:layout_constraintEnd_toEndOf="@+id/text_home"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/text_home" app:layout_constraintStart_toStartOf="@+id/text_home"
@ -115,6 +121,8 @@
android:ems="10" android:ems="10"
android:hint="@string/login_password" android:hint="@string/login_password"
android:inputType="textPassword" android:inputType="textPassword"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintEnd_toEndOf="@+id/text_home" app:layout_constraintEnd_toEndOf="@+id/text_home"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/text_home" app:layout_constraintStart_toStartOf="@+id/text_home"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon> </adaptive-icon>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon> </adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -25,12 +25,12 @@
<fragment <fragment
android:id="@+id/nav_about" android:id="@+id/nav_about"
android:name="com.example.onetap_ssh.fragment.AboutFragment" android:name="com.example.onetap_ssh.fragment.AboutFragment"
android:label="@string/menu_gallery" android:label="@string/fragment_about"
tools:layout="@layout/fragment_about" /> tools:layout="@layout/fragment_about" />
<fragment <fragment
android:id="@+id/nav_settings" android:id="@+id/nav_settings"
android:name="com.example.onetap_ssh.ui.slideshow.SlideshowFragment" android:name="com.example.onetap_ssh.fragment.SettingsFragment"
android:label="@string/menu_slideshow" android:label="@string/settings"
tools:layout="@layout/fragment_settings" /> tools:layout="@layout/fragment_settings" />
</navigation> </navigation>

Binary file not shown.

View File

@ -1,18 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.OneTap_SSH" parent="Base.Theme.OneTap_SSH"> <style name="Theme.OneTap_SSH." parent="Base.Theme.OneTap_SSH">
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>
<item name="colorOnBackground">@color/background_grey</item> <item name="colorOnBackground">@color/background_grey</item>
</style> </style>
<style name="Theme.OneTap_SSH.PopupOverlay">
<item name="colorTheme1">@color/color_blue</item>
<item name="colorTheme2">@color/color_light_green</item>
</style>
<style name="Theme.OneTap_SSH.AppBarOverlay">
<item name="colorTheme1">@color/color_blue</item>
<item name="colorTheme2">@color/color_light_green</item>
</style>
<style name="DialogAnimation">
<item name="android:windowEnterAnimation">@anim/dialog_in</item>
<item name="android:windowExitAnimation">@anim/dialog_out</item>
</style>
</resources> </resources>

View File

@ -1,5 +1,5 @@
<resources> <resources>
<string name="app_name" translatable="false">Code Guard</string> <string name="app_name" translatable="false">OneTap SSH</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="action_about">About</string> <string name="action_about">About</string>
<string name="edit">Edit</string> <string name="edit">Edit</string>
@ -189,8 +189,8 @@
<string name="nav_header_subtitle">1</string> <string name="nav_header_subtitle">1</string>
<string name="nav_header_title">1</string> <string name="nav_header_title">1</string>
<string name="nav_header_desc">1</string> <string name="nav_header_desc">1</string>
<string name="menu_home">1</string> <string name="menu_home">Home</string>
<string name="menu_gallery">1</string> <string name="menu_gallery">Gallery</string>
<string name="menu_slideshow">1</string> <string name="menu_slideshow">1</string>

View File

@ -50,7 +50,7 @@
<item name="colorTheme1">@color/color_orange</item> <item name="colorTheme1">@color/color_orange</item>
<item name="colorTheme2">@color/color_turquoise</item> <item name="colorTheme2">@color/color_turquoise</item>
</style> </style>
<style name="Theme.CringeAuthenticator.Minimalist" parent=""> <style name="Theme.OneTap_SSH.Minimalist" parent="">
<item name="dialogBackground">?android:attr/colorBackground</item> <item name="dialogBackground">?android:attr/colorBackground</item>
<item name="menuBackground">?android:attr/colorBackground</item> <item name="menuBackground">?android:attr/colorBackground</item>
<item name="buttonBackground">@drawable/button_simple</item> <item name="buttonBackground">@drawable/button_simple</item>