TextView textView = findViewById(R.id.textView); int height = textView.getHeight();
RelativeLayout relativeLayout = findViewById(R.id.relativeLayout); int newHeight = 500; RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, newHeight ); relativeLayout.setLayoutParams(layoutParams);Package library: `android.view` is part of the Android Framework.