added dice roller color background compatibility
This commit is contained in:
parent
003ecf879e
commit
42a19f092d
|
|
@ -1,17 +1,21 @@
|
||||||
package xyz.r0r5chach.cpsAssist.dice;
|
package xyz.r0r5chach.cpsAssist.dice;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import xyz.r0r5chach.cpsAssist.R;
|
import xyz.r0r5chach.cpsAssist.R;
|
||||||
import xyz.r0r5chach.cpsAssist.dice.BtnOnClickListener;
|
|
||||||
|
|
||||||
public class DiceActivity extends AppCompatActivity {
|
public class DiceActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_dice);
|
setContentView(R.layout.activity_dice);
|
||||||
|
setTitle("Dice Roller- " + getIntent().getStringExtra("username"));
|
||||||
|
if (getIntent().hasExtra("background")) {
|
||||||
|
findViewById(R.id.dice_layout).setBackgroundColor(Color.parseColor(getIntent().getStringExtra("background")));
|
||||||
|
}
|
||||||
findViewById(R.id.dice_roll_button).setOnClickListener(new BtnOnClickListener());
|
findViewById(R.id.dice_roll_button).setOnClickListener(new BtnOnClickListener());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:id="@+id/dice_layout">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dice_output"
|
android:id="@+id/dice_output"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue