List of usage examples for android.graphics.drawable ColorDrawable ColorDrawable
public ColorDrawable(@ColorInt int color)
From source file:com.adithya321.sharesanalysis.fragments.ChartsFragment.java
@Nullable @Override/*www . jav a 2 s . c om*/ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_charts, container, false); Window window = getActivity().getWindow(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) window.setStatusBarColor(getResources().getColor(R.color.colorPrimaryDark)); ((AppCompatActivity) getActivity()).getSupportActionBar() .setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorPrimary))); return root; }
From source file:bijznas.notify.crouton.ShowInfo.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { dialog = new Dialog(getActivity()); dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); dialog.setContentView(R.layout.show_info); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); context = getActivity();// ww w . ja v a 2 s . c o m manager = getActivity().getSupportFragmentManager(); lv = (ListView) dialog.findViewById(R.id.lVDetails); topdf = (TextView) dialog.findViewById(R.id.topdf); photo = (ImageView) dialog.findViewById(R.id.imageView3); MyCustomAdapter adapterCustom = new MyCustomAdapter(context, caption, information); lv.setAdapter(adapterCustom); ok = (Button) dialog.findViewById(R.id.btnOkSUP); ok.setOnClickListener(this); topdf.setText(info + " Found"); // read(); // Message.message(getActivity(), alContacts.get(0)); dialog.show(); return dialog; }
From source file:com.amazon.android.tv.tenfoot.ui.activities.VerticalContentGridActivity.java
/** * Called when the activity is first created. *///from w w w . j a v a 2 s .c o m @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.vertical_content_grid_layout); getWindow().setBackgroundDrawable( new ColorDrawable(ContextCompat.getColor(this, R.color.browse_background_color))); }
From source file:com.jumplife.phonefragment.LoginFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login, container, false); getDialog().requestWindowFeature(STYLE_NO_TITLE); getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); LoginButton authButton = (LoginButton) view.findViewById(R.id.login_button); authButton.setFragment(this); //authButton.setPublishPermissions(PERMISSIONS); return view;//from w w w .jav a2 s. c o m }
From source file:com.jumplife.tabletfragment.LoginFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login, container, false); getDialog().requestWindowFeature(STYLE_NO_TITLE); getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); LoginButton authButton = (LoginButton) view.findViewById(R.id.login_button); authButton.setFragment(this); return view;// ww w . jav a 2 s . c o m }
From source file:com.github.takahirom.motion_app.PhotoAdapter.java
PhotoAdapter(Activity activity, OnItemClickListener onItemClickListener) { this.activity = activity; this.onItemClickListener = onItemClickListener; final int[] placeholderColors = activity.getResources().getIntArray(R.array.loading_placeholders_light); loadingPlaceholders = new ColorDrawable[placeholderColors.length]; for (int i = 0; i < placeholderColors.length; i++) { loadingPlaceholders[i] = new ColorDrawable(placeholderColors[i]); }//from w w w .jav a 2 s . c om }
From source file:com.evilgenius.testproject.ContactsListActivity.java
public void InitActionbar() { actionbar = getActionBar();//from w w w . j av a2 s .com actionbar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.main_normal))); // Enabling Back navigation on Action Bar icon actionbar.setNavigationMode(ActionBar.DISPLAY_HOME_AS_UP); actionbar.setDisplayHomeAsUpEnabled(true); }
From source file:com.androidhacks7.fastcontactsloader.ContactsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_contacts); getActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.dark_green))); if (savedInstanceState == null) { contactListFragment = new ContactListFragment(); contactListFragment.setContactSelectionListener(this); FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.add(R.id.container, contactListFragment); ft.commit();/*from w w w.j a v a 2 s . c o m*/ } }
From source file:com.burntout.burntout.AddCarActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.add_car_activity); ActionBar bar = getActionBar();//from ww w . ja v a2 s . co m bar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#1E5791"))); bar.setTitle("Burnt Out"); bar.setSubtitle("Add Vehicle"); bar.setDisplayHomeAsUpEnabled(true); //adapter = new AutopickerArrayAdapter(this, R.layout.add_car_activity, autopickerValues); makeModelEntry = (EditText) findViewById(R.id.make_model); plateNumberEntry = (EditText) findViewById(R.id.plate_number); pageMarkers = (PageMarkers) findViewById(R.id.pageMarkersAdd); pageMarkers.setTotalPages(4); pageMarkers.makeView(0); Context context = this; SharedPreferences sharedPref = context.getSharedPreferences(getString(R.string.pref), Context.MODE_PRIVATE); email = sharedPref.getString("email", null); vehicleTypeHSV = (VehicleTypeHSV) findViewById(R.id.addVehicleTypeHSV); vehicleTypeHSV.setComm(this); vehicleTypeHSV.initItems(this); vehicleTypeHSV.setFeatureItems(); vehicleTypeHSV.addManagers(this); statePicker = (StatePicker) findViewById(R.id.statepicker_view2); submitBtn = (Button) findViewById(R.id.submit_button_addcar); addListenerOnSubmit(); }
From source file:com.flowzr.activity.AbstractEditorActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Setup ActionBar getSupportActionBar().setDisplayHomeAsUpEnabled(true); //@see: http://stackoverflow.com/questions/16539251/get-rid-of-blue-line, //only way found to remove on various devices 2.3x, 3.0, ... getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#000000"))); LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); NodeInflater nodeInflater = new NodeInflater(layoutInflater); x = new ActivityLayout(nodeInflater, this); db = new DatabaseAdapter(this); db.open();//from w w w .j a v a 2s . c o m em = db.em(); }