List of usage examples for android.widget FrameLayout getForeground
public Drawable getForeground()
From source file:com.actinarium.kinetic.ui.RecordFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_welcome, container, false); mRecordButton = (FloatingActionButton) view.findViewById(R.id.record); mRecordButton.setOnClickListener(this); FrameLayout fabHolder = (FrameLayout) view.findViewById(R.id.fab_holder); mProgress = fabHolder.getForeground(); mProgress.setLevel(0);/*from www. j a v a 2s . com*/ mRecorder = new DataRecorder(getContext(), this, DataRecorder.DEFAULT_RECORDING_TIME_MILLIS, DataRecorder.DEFAULT_SAMPLING_MICROS); return view; }
From source file:fr.cph.chicago.activity.SearchActivity.java
@Override protected final void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); ChicagoTracker.checkTrainData(this); ChicagoTracker.checkBusData(this); if (!this.isFinishing()) { setContentView(R.layout.activity_search); FrameLayout container = (FrameLayout) findViewById(R.id.container); container.getForeground().setAlpha(0); if (Util.isNetworkAvailable()) { mAdapter = new SearchAdapter(this, container); mBikeStations = getIntent().getExtras().getParcelableArrayList("bikeStations"); handleIntent(getIntent());/*w ww .ja va2s . c o m*/ setListAdapter(mAdapter); } else { Toast.makeText(ChicagoTracker.getAppContext(), "No network connection detected!", Toast.LENGTH_SHORT).show(); } // Preventing keyboard from moving background when showing up getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); } }
From source file:com.tsoliveira.android.listeners.DragDropTouchListener.java
private Bitmap copyViewAsBitmap(View v) { //Clear ripple effect to not get into screenshot, // need something more clever here if (v instanceof FrameLayout) { FrameLayout frameLayout = (FrameLayout) v; Drawable foreground = frameLayout.getForeground(); if (foreground != null) foreground.setVisible(false, false); } else {/*from w w w .j av a2 s. co m*/ if (v.getBackground() != null) v.getBackground().setVisible(false, false); } Bitmap bitmap = Bitmap.createBitmap(v.getMeasuredWidth(), v.getMeasuredHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); v.draw(canvas); return bitmap; }