Skip to content

Commit

Permalink
auto-format
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 25, 2025
1 parent 545348e commit 7c17624
Show file tree
Hide file tree
Showing 10 changed files with 2,380 additions and 654 deletions.
17 changes: 9 additions & 8 deletions app/src/main/java/dev/mfm/app/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
import dev.mfm.app.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
private ActivityMainBinding binding;

binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);

binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
}

@Override
protected void onDestroy() {
Expand Down
138 changes: 70 additions & 68 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,74 +1,76 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
android:background="?attr/colorSurface">

<com.google.android.material.card.MaterialCardView
android:id="@+id/cardView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:padding="16dp"
app:cardCornerRadius="16dp"
app:cardElevation="8dp"
app:cardBackgroundColor="?attr/colorSurface"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
android:background="?attr/colorSurface">

<ImageView
android:id="@+id/appIcon"
android:layout_width="80dp"
android:layout_height="80dp"
android:contentDescription="@string/app_name"
android:src="@drawable/icon"
android:layout_gravity="center"
android:tint="?attr/colorPrimary" />
</com.google.android.material.card.MaterialCardView>

<com.google.android.material.textview.MaterialTextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?attr/textAppearanceHeadline6"
android:fontFamily="sans-serif-medium"
android:textStyle="bold"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/cardView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:textColor="?attr/colorOnSurface" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:padding="16dp"
app:cardCornerRadius="16dp"
app:cardElevation="8dp"
app:cardBackgroundColor="?attr/colorSurface"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/appDetails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_details"
android:textAppearance="?attr/textAppearanceBody1"
android:fontFamily="sans-serif"
android:lineSpacingExtra="4dp"
android:layout_marginTop="8dp"
android:paddingHorizontal="24dp"
app:layout_constraintTop_toBottomOf="@id/appName"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:textColor="?attr/colorOnSurfaceVariant" />
<com.google.android.material.button.MaterialButton
android:id="@+id/getStartedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get Started"
style="@style/Widget.MaterialComponents.Button"
app:cornerRadius="50dp"
android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@id/appDetails"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:textColor="?attr/colorOnPrimary" />
<ImageView
android:id="@+id/appIcon"
android:layout_width="80dp"
android:layout_height="80dp"
android:contentDescription="@string/app_name"
android:src="@drawable/icon"
android:layout_gravity="center"
android:tint="?attr/colorPrimary" />

</com.google.android.material.card.MaterialCardView>

<com.google.android.material.textview.MaterialTextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?attr/textAppearanceHeadline6"
android:fontFamily="sans-serif-medium"
android:textStyle="bold"
android:layout_marginTop="16dp"
android:textColor="?attr/colorOnSurface"
app:layout_constraintTop_toBottomOf="@id/cardView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/appDetails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_details"
android:textAppearance="?attr/textAppearanceBody1"
android:fontFamily="sans-serif"
android:lineSpacingExtra="4dp"
android:layout_marginTop="8dp"
android:paddingHorizontal="24dp"
android:textColor="?attr/colorOnSurfaceVariant"
app:layout_constraintTop_toBottomOf="@id/appName"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<com.google.android.material.button.MaterialButton
android:id="@+id/getStartedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get Started"
android:layout_marginTop="24dp"
android:textColor="?attr/colorOnPrimary"
style="@style/Widget.MaterialComponents.Button"
app:cornerRadius="50dp"
app:layout_constraintTop_toBottomOf="@id/appDetails"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
18 changes: 13 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>
<adaptive-icon
xmlns:android="http://schemas.android.com/apk/res/android">

<background
android:drawable="@mipmap/ic_launcher_background" />

<foreground
android:drawable="@mipmap/ic_launcher_foreground" />

<monochrome
android:drawable="@mipmap/ic_launcher_monochrome" />

</adaptive-icon>
Loading

0 comments on commit 7c17624

Please sign in to comment.