Code example for LinearLayout

Methods: setPaddingaddViewsetOrientation

0
 
	} 
	@Override 
		protected View onCreateDialogView() {
			LinearLayout.LayoutParams params;
			LinearLayout layout = new LinearLayout(mContext);
			layout.setOrientation(LinearLayout.VERTICAL);
			layout.setPadding(6,6,6,6);
 
			mSplashText = new TextView(mContext);
			if (mDialogMessage != null)
				mSplashText.setText(mDialogMessage);
			layout.addView(mSplashText);
 
			mValueText = new TextView(mContext);
			mValueText.setGravity(Gravity.CENTER_HORIZONTAL);
			mValueText.setTextSize(32);
			params = new LinearLayout.LayoutParams(
					LayoutParams.FILL_PARENT,
					LayoutParams.WRAP_CONTENT);
			layout.addView(mValueText, params);
 
			mSeekBar = new SeekBar(mContext);
			mSeekBar.setOnSeekBarChangeListener(this);
			layout.addView(mSeekBar, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
 
			if (shouldPersist()) 
				mValue = getPersistedInt(mDefault);
 
			mSeekBar.setMax(mMax);
Contextual code suggestions in your IDE  Get Codota for Java