Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void MenuContents(){
- final RelativeLayout collapsedView = new RelativeLayout(this);
- RelativeLayout.LayoutParams collapsedViewParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
- collapsedView.setLayoutParams(collapsedViewParam);
- collapsedView.setVisibility(View.VISIBLE);
- menuHolder.addView(collapsedView);
- final RelativeLayout expandedView = new RelativeLayout(this);
- RelativeLayout.LayoutParams expandedViewParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
- expandedView.setLayoutParams(expandedViewParam);
- expandedView.setVisibility(View.VISIBLE);
- expandedView.setBackgroundColor(Color.parseColor("#FF0000"));
- menuHolder.addView(expandedView);
- final ImageView kingIcon = new ImageView(this);
- ViewGroup.LayoutParams kingIconParam = new ViewGroup.LayoutParams(175, 175);
- kingIcon.setLayoutParams(kingIconParam);
- collapsedView.addView(kingIcon);
- File myFile = new File(Environment.getExternalStorageDirectory().getPath() + "/king/images/king_icon_round.png");
- Bitmap bmp = BitmapFactory.decodeFile(myFile.getAbsolutePath());
- kingIcon.setImageBitmap(bmp);
- final LinearLayout LL = new LinearLayout(this);
- LinearLayout.LayoutParams LLP = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- LL.setLayoutParams(LLP);
- LL.setOrientation(LinearLayout.VERTICAL);
- expandedView.addView(LL);
- final TextView TV = new TextView(this);
- RelativeLayout.LayoutParams TVP = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- TV.setLayoutParams(TVP);
- TV.setText("Platinmods Team!");
- TV.setTextColor(Color.parseColor("#A4D3EE"));
- TV.setBackgroundColor(Color.parseColor("#000000"));
- TV.setGravity(Gravity.CENTER_HORIZONTAL);
- LL.addView(TV);
- final Switch sw = new Switch(this);
- RelativeLayout.LayoutParams swP = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- sw.setLayoutParams(swP);
- sw.setText("One Hit Ability Damage");
- sw.setTextColor(Color.parseColor( "#adff2f"));
- sw.setBackgroundColor(Color.parseColor("#000000"));
- sw.setGravity(Gravity.CENTER_HORIZONTAL);
- LL.addView(sw);
- sw.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- if (sw.isChecked()) {
- Inject.write(0xC8483C, "4F 0A A0 E3 1E FF 2F E1", lib);
- sw.setTextColor(Color.parseColor("#0000FF")); //Test Purposes
- }
- else {
- Inject.write(0xC8483C, "F0 4F 2D E9 1C B0 8D E2", lib);
- sw.setTextColor(Color.parseColor("#FF0000")); //Test Purposes
- }
- }
- });
- final Switch sw2 = new Switch(this);
- RelativeLayout.LayoutParams swP2 = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- sw2.setLayoutParams(swP2);
- sw2.setText("No Ability Cost");
- sw2.setTextColor(Color.parseColor( "#adff2f"));
- sw2.setBackgroundColor(Color.parseColor("#000000"));
- sw2.setGravity(Gravity.CENTER_HORIZONTAL);
- LL.addView(sw2);
- sw2.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- if (sw.isChecked()) {
- Inject.write(0xC643B4, "00 00 A0 E3 1E FF 2F E1", lib);
- sw.setTextColor(Color.parseColor("#0000FF")); //Test Purposes
- }
- else {
- Inject.write(0xC643B4, "D0 02 C0 E1 1E FF 2F E1", lib);
- sw.setTextColor(Color.parseColor("#FF0000")); //Test Purposes
- }
- }
- });
- final ImageView iconCloseButton = new ImageView(this);
- LinearLayout.LayoutParams iconCloseButtonParam = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 75);
- iconCloseButton.setLayoutParams(iconCloseButtonParam);
- LL.addView(iconCloseButton);
- File myFile1 = new File(Environment.getExternalStorageDirectory().getPath() + "/king/images/collapse_button1.png");
- Bitmap bmp1 = BitmapFactory.decodeFile(myFile1.getAbsolutePath());
- iconCloseButton.setImageBitmap(bmp1);
- iconCloseButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- collapsedView.setVisibility(View.VISIBLE);
- expandedView.setVisibility(View.GONE);
- }
- });
- collapsedViewF = collapsedView;
- expandedViewF = expandedView;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement