List of usage examples for android.widget FrameLayout getBackground
public Drawable getBackground()
From source file:com.adamas.client.android.ui.ConnectorsFragment.java
public void changeHomeImage(View rootview) { if (true) {// www. j a va2 s . co m return; } //the layout is not attached to root activity yet, so the following call does not work // ((MainActivity)getActivity()).changeHomeImage(true); FrameLayout frameLayout = (FrameLayout) rootview.findViewById(R.id.layouthelpinghand); if (frameLayout != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (((MainActivity) getActivity()).isConnected()) { // frameLayout.setBackground(getResources().getDrawable(R.drawable.helpinghand, getTheme())); frameLayout.getBackground().setTint(getResources().getColor(R.color.material_yellow_300)); frameLayout.getBackground().setTintMode(PorterDuff.Mode.SCREEN); } else { // frameLayout.setBackground(getResources().getDrawable(R.drawable.helpinghand, getTheme())); frameLayout.getBackground().setTintMode(PorterDuff.Mode.SCREEN); frameLayout.getBackground().setTint(getResources().getColor(R.color.material_grey_300)); } } else { if (((MainActivity) getActivity()).isConnected()) { // frameLayout.setBackgroundDrawable(getResources().getDrawable(R.drawable.helpinghand)); } else { // frameLayout.setBackgroundDrawable(getResources().getDrawable(R.drawable.helpinghand)); } } } }