Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void greyView(View v){
- grey = (Button) findViewById(R.id.greyButton);
- relativeLayout = (RelativeLayout) findViewById(R.id.contentmainactivity2);
- relativeLayout.setBackgroundColor(Color.parseColor("#383838"));
- }
- RelativeLayout popupwindow = (RelativeLayout) findViewById(R.id.popupwindow);
- relativeLayout = (RelativeLayout) findViewById(R.id.contentmainactivity2);
- settings = (Button) findViewById(R.id.settingsbutton);
- settings.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- layoutInflater = (LayoutInflater) getApplicationContext().getSystemService(LAYOUT_INFLATER_SERVICE);
- ViewGroup container = (ViewGroup) layoutInflater.inflate(R.layout.popupwindow, null);
- popupWindow = new PopupWindow(container, 600, 100, true);
- popupWindow.showAtLocation(relativeLayout, Gravity.NO_GRAVITY, 10, 975);
- container.setOnTouchListener(new View.OnTouchListener(){
- @Override
- public boolean onTouch(View view, MotionEvent motionEvent){
- popupWindow.dismiss();
- return true;
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement