List of usage examples for android.graphics Color TRANSPARENT
int TRANSPARENT
To view the source code for android.graphics Color TRANSPARENT.
Click Source Link
From source file:com.dogar.geodesic.map.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { // Account stuff settings = getSharedPreferences("Geodesic", 0); credential = GoogleAccountCredential.usingAudience(this, AUDIENCE); setAccountName(settings.getString("ACCOUNT_NAME", null)); if (credential.getSelectedAccountName() != null) { // Already signed in, begin app! Toast.makeText(getBaseContext(), "Logged in with : " + credential.getSelectedAccountName(), Toast.LENGTH_LONG).show(); if (savedInstanceState == null) { setGMFragment();/*w w w. j a va 2 s . co m*/ } } else { // Not signed in, show login window or request an account. chooseAccount(); } super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTitle = mDrawerTitle = getTitle(); mIcons = getResources().obtainTypedArray(R.array.nav_items_icons); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerList = (ListView) findViewById(R.id.list_slidermenu); mAdapter = new NavDrawerListAdapter(this); mHeaders = getResources().getStringArray(R.array.menu_headers); mAdapter.addHeader(accountName); /******************* Actions *********************/ actionTitles = getResources().getStringArray(R.array.actions_types); mAdapter.addHeader(mHeaders[0]); int i; for (i = 0; i < actionTitles.length; i++) mAdapter.addItem(actionTitles[i], mIcons.getResourceId(i, -1)); mIcons.recycle(); /******************* About *********************/ mAdapter.addHeader(mHeaders[1]); helpTitles = getResources().getStringArray(R.array.help_items); mAdapter.addItem(helpTitles[0], mIcons.getResourceId(i++, -1)); mDrawerList.setOnItemClickListener(new DrawerItemClickListener()); mDrawerList.setAdapter(mAdapter); // enable ActionBar app icon to behave as action to toggle nav drawer getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setHomeButtonEnabled(true); // ActionBarDrawerToggle ties together the the proper interactions // between the sliding drawer and the action bar app icon mDrawerToggle = new ActionBarDrawerToggle(this, /* host Activity */ mDrawerLayout, /* DrawerLayout object */ R.drawable.ic_drawer, /* nav drawer image to replace 'Up' caret */ R.string.drawer_open, /* "open drawer" description for accessibility */ R.string.drawer_close /* "close drawer" description for accessibility */ ) { public void onDrawerClosed(View view) { getActionBar().setTitle(mTitle); invalidateOptionsMenu(); // creates call to // onPrepareOptionsMenu() } public void onDrawerSlide(View drawerView, float slideOffset) { super.onDrawerSlide(drawerView, slideOffset); mDrawerLayout.bringChildToFront(drawerView); mDrawerLayout.requestLayout(); mDrawerLayout.setScrimColor(Color.TRANSPARENT); } public void onDrawerOpened(View drawerView) { getActionBar().setTitle(mDrawerTitle); invalidateOptionsMenu(); // creates call to // onPrepareOptionsMenu() } }; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); mDrawerLayout.setDrawerListener(mDrawerToggle); }
From source file:com.appeaser.sublimepickerlibrary.utilities.SUtils.java
private static Drawable createButtonNormalBg(Context context, int colorControlHighlight) { StateListDrawable sld = new StateListDrawable(); sld.addState(new int[] { android.R.attr.state_pressed }, createButtonShape(context, colorControlHighlight)); sld.addState(new int[] {}, new ColorDrawable(Color.TRANSPARENT)); return sld;//from w w w . j av a2 s . c o m }
From source file:com.esri.android.mapsapp.tools.MeasuringTool.java
public MeasuringTool(MapView map) { this.mMap = map; mContext = mMap.getContext();//from w w w.j a v a 2s . c om mMarkerSymbol = new SimpleMarkerSymbol(Color.RED, 10, STYLE.CIRCLE); mLineSymbol = new SimpleLineSymbol(Color.BLACK, 3); mDefaultLinearUnits = new Unit[] { Unit.create(LinearUnit.Code.METER), Unit.create(LinearUnit.Code.KILOMETER), Unit.create(LinearUnit.Code.FOOT), Unit.create(LinearUnit.Code.MILE_STATUTE) }; mDefaultAreaUnits = new Unit[] { Unit.create(AreaUnit.Code.SQUARE_METER), Unit.create(AreaUnit.Code.SQUARE_KILOMETER), Unit.create(AreaUnit.Code.SQUARE_FOOT), Unit.create(AreaUnit.Code.SQUARE_MILE_STATUTE) }; mFillSymbol = new SimpleFillSymbol(Color.argb(100, 225, 225, 0)); mFillSymbol.setOutline(new SimpleLineSymbol(Color.TRANSPARENT, 0)); }
From source file:android.support.wear.widget.drawer.PageIndicatorView.java
private void updateDotPaint(Paint dotPaint, Paint shadowPaint, float baseRadius, float shadowRadius, int color, int shadowColor) { float radius = baseRadius + shadowRadius; float shadowStart = baseRadius / radius; Shader gradient = new RadialGradient(0, 0, radius, new int[] { shadowColor, shadowColor, Color.TRANSPARENT }, new float[] { 0f, shadowStart, 1f }, TileMode.CLAMP);// ww w. j a v a 2 s . com shadowPaint.setShader(gradient); dotPaint.setColor(color); dotPaint.setStyle(Style.FILL); }
From source file:com.example.android.apis.graphics.FingerPaint.java
@Override public boolean onOptionsItemSelected(MenuItem item) { mPaint.setXfermode(null);/*w ww . ja v a2 s. c om*/ mPaint.setAlpha(0xFF); switch (item.getItemId()) { case ERASE_ALL_ID: myView.getBitmap().eraseColor(Color.TRANSPARENT); myView.invalidate(); return true; case COLOR_MENU_ID: new ColorPickerDialog(this, this, mPaint.getColor()).show(); return true; case EMBOSS_MENU_ID: if (mPaint.getMaskFilter() != mEmboss) { mPaint.setMaskFilter(mEmboss); } else { mPaint.setMaskFilter(null); } return true; case BLUR_MENU_ID: if (mPaint.getMaskFilter() != mBlur) { mPaint.setMaskFilter(mBlur); } else { mPaint.setMaskFilter(null); } return true; case ERASE_MENU_ID: mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR)); return true; case SRCATOP_MENU_ID: mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_ATOP)); mPaint.setAlpha(0x80); return true; } return super.onOptionsItemSelected(item); }
From source file:com.kncwallet.wallet.ui.SendingAddressesFragment.java
@Override public void onActivityCreated(final Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setEmptyText(getString(R.string.address_book_empty_text)); adapter = new SimpleCursorAdapter(activity, R.layout.address_book_row, null, new String[] { AddressBookProvider.KEY_RAW_TELEPHONE, AddressBookProvider.KEY_ADDRESS, AddressBookProvider.KEY_LABEL, AddressBookProvider.KEY_ADDRESS, AddressBookProvider.KEY_ADDRESS }, new int[] { R.id.address_book_row_number, R.id.address_book_contact_image, R.id.address_book_row_label, R.id.address_book_row_address, R.id.address_book_row_source_image }, 0);//from w ww. ja v a2 s . c om adapter.setViewBinder(new ViewBinder() { @Override public boolean setViewValue(final View view, final Cursor cursor, final int columnIndex) { if (view.getId() == R.id.address_book_contact_image) { SmartImageView img = (SmartImageView) view; String address = cursor.getString(columnIndex); Bitmap contactImage = cachedBitmap(address); if (contactImage != null) { img.setImageBitmap(contactImage); } else { String imageUrl = cachedImageUrl(address); if (imageUrl != null) { img.setImageUrl(imageUrl, R.drawable.contact_placeholder); } else { img.setImageResource(R.drawable.contact_placeholder); } } return true; //true because the data was bound to the view } if (view.getId() == R.id.address_book_row_number) { ((TextView) view).setText(cursor.getString(columnIndex)); return true; } if (!AddressBookProvider.KEY_ADDRESS.equals(cursor.getColumnName(columnIndex))) return false; if (view.getId() == R.id.address_book_row_source_image) { ((ImageView) view).setImageResource(cachedSourceImageResource(cursor.getString(columnIndex))); view.setVisibility(View.VISIBLE); return true; } ((TextView) view).setText(WalletUtils.formatHash(cursor.getString(columnIndex), Constants.ADDRESS_FORMAT_GROUP_SIZE, 24)); return true; } }); setListAdapter(adapter); loaderManager.initLoader(0, null, this); getListView().setCacheColorHint(Color.TRANSPARENT); getListView().setBackgroundColor(getResources().getColor(R.color.knc_background_darker)); getView().setBackgroundColor(getResources().getColor(R.color.knc_background_darker)); }
From source file:chinanurse.cn.nurse.list.WaveSwipeRefreshLayout.java
@Override public boolean onPreDraw() { getViewTreeObserver().removeOnPreDrawListener(this); mWaveView.bringToFront();//from w ww.j a v a2 s .c o m mCircleView.bringToFront(); if (mIsManualRefresh) { mIsManualRefresh = false; mWaveView.manualRefresh(); reInitCircleView(); mCircleView.setBackgroundColor(Color.TRANSPARENT);// // mCircleView.setBackgroundColor(getResources().getColor(R.color.purple));// mCircleView.setTranslationY(mWaveView.getCurrentCircleCenterY() + mCircleView.getHeight() / 2); animateOffsetToCorrectPosition(); } return false; }
From source file:gr.scify.newsum.ui.SearchViewActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) != Configuration.SCREENLAYOUT_SIZE_NORMAL & (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) != Configuration.SCREENLAYOUT_SIZE_SMALL) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); }//from w w w . j a v a 2s .co m SharedPreferences usertheme = getSharedPreferences("theme", 0); int newTheme = usertheme.getInt("theme", 2); Utils.onActivityCreateSetTheme(this, newTheme); SharedPreferences userlang = getSharedPreferences("lang", 0); String newlang = userlang.getString("lang", Locale.getDefault().getLanguage()); Setlanguage.updateLanguage(getApplicationContext(), newlang); GestureOverlayView gestureOverlayView = new GestureOverlayView(this); View inflate = getLayoutInflater().inflate(R.layout.view, null); gestureOverlayView.addView(inflate); gestureOverlayView.addOnGesturePerformedListener(this); gestureOverlayView.setGestureColor(Color.TRANSPARENT); gestureOverlayView.setUncertainGestureColor(Color.TRANSPARENT); gestureLib = GestureLibraries.fromRawResource(this, R.raw.gestures); if (!gestureLib.load()) { finish(); } requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(gestureOverlayView); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); ImageView title_image = (ImageView) findViewById(R.id.title_image); title_image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent browse = new Intent(Intent.ACTION_VIEW, Uri.parse(getResources().getString(R.string.scify))); startActivity(browse); } }); // setContentView(R.layout.view); // TODO: Add Loading dialog SharedPreferences setvmassage = getSharedPreferences("dialog", 0); boolean dialogShown = setvmassage.getBoolean("dialogShown", false); if (!dialogShown) { // prepare the alert box AlertDialog.Builder alertbox = new AlertDialog.Builder(this); alertbox.setMessage(R.string.view_massage); alertbox.setNeutralButton(R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { } }); alertbox.setCancelable(false); alertbox.show(); SharedPreferences.Editor editor = setvmassage.edit(); editor.putBoolean("dialogShown", true); editor.commit(); } // Init waiting dialog showWaitingDialog(); initLayoutAndControls(); }
From source file:com.vidinoti.pixlive.PixLive.java
protected void pluginInitialize() { startSDK(cordova.getActivity());/* www . j a va 2s.co m*/ VDARSDKController.getInstance().setEnableCodesRecognition(true); VDARSDKController.getInstance().setActivity(cordova.getActivity()); VDARSDKController.getInstance().registerEventReceiver(this); VDARSDKController.getInstance().addNewAfterLoadingTask(new Runnable() { @Override public void run() { Intent intent = cordova.getActivity().getIntent(); if (intent != null && intent.getExtras() != null && intent.getExtras().getString("nid") != null) { VDARSDKController.getInstance().processNotification(intent.getExtras().getString("nid"), intent.getExtras().getBoolean("remote")); } } }); cordova.getActivity().runOnUiThread(new Runnable() { public void run() { if (touchView == null) { View v = webView.getView(); FrameLayout parent = ((FrameLayout) v.getParent()); parent.removeView(v); touchView = new TouchInterceptorView(cordova.getActivity()); touchView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); cordova.getActivity().setContentView(touchView); touchView.addView(v); v.setBackgroundColor(Color.TRANSPARENT); } } }); }
From source file:com.fbartnitzek.tasteemall.filter.EntityFilterTabFragment.java
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { Log.v(LOG_TAG, "onActivityResult, hashCode=" + this.hashCode() + ", " + "requestCode = [" + requestCode + "], resultCode = [" + resultCode + "], data = [" + data + "]"); if (requestCode == REQUEST_ATTRIBUTE_FILTER_CODE && resultCode == Activity.RESULT_OK) { if (data.hasExtra(EXTRA_ATTRIBUTE_FILTERED)) { RecyclerView.ViewHolder vh = mAttributesRecycler.findViewHolderForAdapterPosition(mPosition); Log.v(LOG_TAG, "onActivityResult, hashCode=" + this.hashCode() + ", " + "vh=" + vh); // snackbar with all filters for entity...? - not usable for selection... // TODO: store to restore, maybe via jsonFilter... if (data.getBooleanExtra(EXTRA_ATTRIBUTE_FILTERED, false)) { mSelected.add(mPosition); vh.itemView.setBackgroundColor(Color.GREEN); } else { mSelected.remove((Integer) mPosition); vh.itemView.setBackgroundColor(Color.TRANSPARENT); }//from ww w.ja va2s . co m } } super.onActivityResult(requestCode, resultCode, data); }