List of usage examples for android.widget FrameLayout FrameLayout
public FrameLayout(@NonNull Context context)
From source file:org.telegram.ui.Cells.ChatUnreadCell.java
public ChatUnreadCell(Context context) { super(context); FrameLayout frameLayout = new FrameLayout(context); frameLayout.setBackgroundColor(ContextCompat.getColor(context, R.color.chat_drawable_tint)); //setBackgroundResource(R.drawable.newmsg_divider); frameLayout.setElevation(AndroidUtilities.dp(1)); addView(frameLayout,/*from ww w.j a va 2 s . co m*/ LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 27, Gravity.LEFT | Gravity.TOP, 0, 8, 0, 4)); ImageView imageView = new ImageView(context); imageView.setImageResource(R.drawable.ic_ab_new); imageView.setPadding(0, AndroidUtilities.dp(2), 0, 0); frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.RIGHT | Gravity.CENTER_VERTICAL, 0, 0, 10, 0)); textView = new TextView(context); textView.setPadding(0, 0, 0, AndroidUtilities.dp(1)); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); textView.setTextColor(Theme.CHAT_UNREAD_TEXT_COLOR); textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); frameLayout.addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER)); }
From source file:am.project.x.business.common.LoadingDialog.java
public LoadingDialog(Context context) { super(context, R.style.TransparentDialog); final FrameLayout contentView = new FrameLayout(context); final MaterialProgressImageView loading = new MaterialProgressImageView(context); loading.setColorSchemeColors(ContextCompat.getColor(context, android.R.color.holo_red_light), ContextCompat.getColor(context, android.R.color.holo_blue_light), ContextCompat.getColor(context, android.R.color.holo_green_light), ContextCompat.getColor(context, android.R.color.holo_orange_light), ContextCompat.getColor(context, android.R.color.holo_purple)); contentView.addView(loading, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.CENTER)); setContentView(contentView);//from w w w . j a va 2 s . co m setCancelable(false); setCanceledOnTouchOutside(false); }
From source file:androidx.navigation.fragment.test.EmptyFragment.java
@Nullable @Override// www . j a v a 2 s . c o m public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return new FrameLayout(requireContext()); }
From source file:com.android.example.github.testing.SingleFragmentActivity.java
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); FrameLayout content = new FrameLayout(this); content.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); content.setId(R.id.container);/*from w w w .j a v a 2 s . c om*/ setContentView(content); }
From source file:Windows.UI.Xaml.Controls.Page.java
public Page(android.content.Context context) { super(context); FrameLayout layout = new FrameLayout(context); this.layout = layout; FrameLayout menu = new FrameLayout(context); this.menu = menu; /*/* w w w . j av a 2 s. co m*/ // Fill the area provided by the parent FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ); this.setLayoutParams(lp); */ }
From source file:com.android.tabcarouseldemo.ColorFragment.java
/** * {@inheritDoc}/*from w w w .j a va 2 s . c o m*/ */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final int color = getArguments().getInt("color"); final FrameLayout root = new FrameLayout(getActivity()); root.setBackgroundColor(color); return root; }
From source file:com.esminis.server.library.dialog.pager.DialogPager.java
protected DialogPager(Context context, Presenter presenter) { super(context, presenter); final FrameLayout layout = new FrameLayout(context); layout.addView(// w ww . j a v a2s . c om pager = (ViewPager) LayoutInflater.from(context).inflate(R.layout.dialog_pager, layout, false)); setContentView(layout); super.setOnShowListener(new OnShowListener() { public void onShow(DialogInterface dialog) { if (listener != null) { listener.onShow(dialog); } } }); }
From source file:com.barcamppenang2013.TransparentSupportMapFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup view, Bundle savedInstance) { View layout = super.onCreateView(inflater, view, savedInstance); FrameLayout frameLayout = new FrameLayout(getActivity()); frameLayout.setBackgroundColor(getResources().getColor(android.R.color.transparent)); ((ViewGroup) layout).addView(frameLayout, new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); return layout; }
From source file:com.hellofyc.base.app.activity.SingleFragmentActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FrameLayout layout = new FrameLayout(this); layout.setId(R.id.fragment_container); layout.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)); setContentView(layout);/*from www . ja v a 2 s. c o m*/ init(); setActivityContent(); }
From source file:at.alladin.rmbt.android.sync.RMBTSyncFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) { FrameLayout frameLayout = new FrameLayout(getActivity()); populateViewForOrientation(inflater, frameLayout); return frameLayout; }