Skip to content

Instantly share code, notes, and snippets.

@wilyJ80
Last active September 21, 2025 00:20
Show Gist options
  • Select an option

  • Save wilyJ80/59b13ec55d81767d7ff69447b2519ab1 to your computer and use it in GitHub Desktop.

Select an option

Save wilyJ80/59b13ec55d81767d7ff69447b2519ab1 to your computer and use it in GitHub Desktop.
Copyright Notice XML View
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<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="20dp"
>
<TextView
android:id="@+id/titleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Copyright Notice"
style="@style/TextAppearance.MaterialComponents.Headline1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
<TextView
android:id="@+id/bodyTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance.MaterialComponents.Body1"
android:text="You shall agree on giving us all your money. Don't give a damn. Just give all your money. All IP you create in your life belongs to us. And just in case it's not clear enough: You shall agree on giving us all your money. Don't give a damn. Just give all your money. All IP you create in your life belongs to us. And just in case it's not clear enough: You shall agree on giving us all your money. Don't give a damn. Just give all your money. All IP you create in your life belongs to us. And just in case it's not clear enough: You shall agree on giving us all your money. Don't give a damn. Just give all your money. All IP you create in your life belongs to us. And just in case it's not clear enough: You shall agree on giving us all your money. Don't give a damn. Just give all your money. All IP you create in your life belongs to us. And just in case it's not clear enough: You shall agree on giving us all your money. Don't give a damn. Just give all your money. All IP you create in your life belongs to us. And just in case it's not clear enough: "
app:layout_constraintTop_toBottomOf="@id/titleTextView"
app:layout_constraintStart_toStartOf="parent"
/>
<Button
android:id="@+id/sendButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Agree with everything forever"
style="@style/ShapeAppearanceOverlay.Material3.Button"
app:layout_constraintTop_toBottomOf="@+id/bodyTextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_margin="16dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
package com.example.myapplication;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowCompat;
import androidx.core.view.WindowInsetsCompat;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = (Button) findViewById(R.id.sendButton);
button.setOnClickListener(v -> {
Context context = getApplicationContext();
String text = "Sold your soul!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment