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.axolotl.yanews.customize.SlidingTabLayout.java
public void setCurrentItem(int index) { mViewPager.setCurrentItem(index, false); int count = mTabStrip.getChildCount(); int curItem = mViewPager.getCurrentItem(); for (int i = 0; i < count; i++) { // by neo View tabView = SlidingTabLayout.this.getTabAt(i); if (i == curItem) { TextViewUtil.setTextColor(tabView, mNormalColor); tabView.setBackgroundColor(getColorByIndex(i)); } else {/*www. j a va 2 s.c o m*/ TextViewUtil.setTextColor(tabView, getColorByIndex(i)); tabView.setBackgroundColor(Color.TRANSPARENT); } } }
From source file:com.mainpanel.LifeApp_Map.java
@SuppressLint("NewApi") @Override//w w w. ja va2s. c om public boolean onMyLocationButtonClick() { Log.d("mymap", "button click event"); //Toast.makeText(this, "Refresh", Toast.LENGTH_SHORT).show(); // Return false so that we don't consume the event and the default behavior still occurs // (the camera animates to the user's current position). //mMap.clear(); double lat = mLocationClient.getLastLocation().getLatitude(); double longi = mLocationClient.getLastLocation().getLongitude(); // lat = 40.6944; // longi = -73.9865; CameraPosition cameraPosition = new CameraPosition.Builder().target(new LatLng(lat, longi)).zoom(15) .build(); mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); // create marker MarkerOptions marker = new MarkerOptions().position(new LatLng(lat, longi)).title("You're here") .icon(BitmapDescriptorFactory.fromResource(R.drawable.home)); // adding marker mMap.addMarker(marker).showInfoWindow(); CircleOptions circleOptions = new CircleOptions().center(new LatLng(lat, longi)) //set center .radius(500) //set radius in meters .fillColor(Color.parseColor("#500084d3")).strokeColor(Color.TRANSPARENT).strokeWidth(2); mMap.addCircle(circleOptions); mMap.setOnInfoWindowClickListener(this); return false; }
From source file:com.facebook.LikeView.java
private void initialize(Context context) { edgePadding = getResources().getDimensionPixelSize(R.dimen.com_facebook_likeview_edge_padding); internalPadding = getResources().getDimensionPixelSize(R.dimen.com_facebook_likeview_internal_padding); if (foregroundColor == NO_FOREGROUND_COLOR) { foregroundColor = getResources().getColor(R.color.com_facebook_likeview_text_color); }//from w ww . j a v a 2 s . c om setBackgroundColor(Color.TRANSPARENT); containerView = new LinearLayout(context); LayoutParams containerViewLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); containerView.setLayoutParams(containerViewLayoutParams); initializeLikeButton(context); initializeSocialSentenceView(context); initializeLikeCountView(context); containerView.addView(likeButton); containerView.addView(socialSentenceView); containerView.addView(likeBoxCountView); addView(containerView); setObjectIdAndTypeForced(this.objectId, this.objectType); updateLikeStateAndLayout(); }
From source file:com.rks.musicx.ui.fragments.PlayingViews.Playing1Fragment.java
@Override protected void function() { ateKey = Helper.getATEKey(getContext()); accentColor = Config.accentColor(getContext(), ateKey); getActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC); favButton.setOnClickListener(mOnClickListener); favhelper = new FavHelper(getContext()); share.setOnClickListener(mOnClickListener); eqButton.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.eq)); eqButton.setOnClickListener(mOnClickListener); share.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.shares)); shuffleButton.setOnClickListener(mOnClickListener); shuffleButton.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.shuf_off)); repeatButton.setOnClickListener(mOnClickListener); repeatButton.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.rep_no)); moreMenu.setOnClickListener(mOnClickListener); moreMenu.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_menu)); CustomLayoutManager customlayoutmanager = new CustomLayoutManager(getContext()); customlayoutmanager.setOrientation(LinearLayoutManager.VERTICAL); customlayoutmanager.setSmoothScrollbarEnabled(true); queuerv.setLayoutManager(customlayoutmanager); queuerv.addItemDecoration(new DividerItemDecoration(getContext(), 75, true)); queuerv.setHasFixedSize(true);/*from ww w . j a v a2 s. c om*/ queueAdapter = new QueueAdapter(getContext(), this); queueAdapter.setLayoutId(R.layout.song_list); queuerv.setAdapter(queueAdapter); queueAdapter.setOnItemClickListener(mOnClick); ItemTouchHelper.Callback callback = new SimpleItemTouchHelperCallback(queueAdapter); mItemTouchHelper = new ItemTouchHelper(callback); mItemTouchHelper.attachToRecyclerView(queuerv); slidingpanelayout.setSliderFadeColor(Color.TRANSPARENT); slidingpanelayout.setCoveredFadeColor(Color.TRANSPARENT); Playing3view.setBackgroundColor(accentColor); if (getActivity() == null) { return; } getActivity().getWindow().setStatusBarColor(accentColor); helper = new Helper(getContext()); }
From source file:com.saulcintero.moveon.fragments.Summary3.java
private void lineChartView_type2(final int type) { if (paintChartView) { txt1.setVisibility(View.GONE); TypedValue outValue1 = new TypedValue(); TypedValue outValue2 = new TypedValue(); TypedValue outValue3 = new TypedValue(); TypedValue outValue4 = new TypedValue(); mContext.getResources().getValue(R.dimen.line2_axis_title_text_size_value, outValue1, true); mContext.getResources().getValue(R.dimen.line2_chart_title_text_size_value, outValue2, true); mContext.getResources().getValue(R.dimen.line2_labels_text_size_value, outValue3, true); mContext.getResources().getValue(R.dimen.line2_legend_text_size_value, outValue4, true); float line2AxisTitleTextSizeValue = outValue1.getFloat(); float line2CharTitleTextSizeValue = outValue2.getFloat(); float line2LabelsTextSizeValue = outValue3.getFloat(); float line2LegendTextSizeValue = outValue4.getFloat(); XYMultipleSeriesDataset mDataset = null; XYMultipleSeriesRenderer mRenderer = null; switch (type) { case 1://from ww w .j a v a 2 s .c o m mDataset = getDataset_type2(1); break; case 2: mDataset = getDataset_type2(2); break; } mRenderer = getRenderer_type2(type); mRenderer.setApplyBackgroundColor(true); mRenderer.setBackgroundColor(Color.TRANSPARENT); mRenderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01)); mRenderer.setAxisTitleTextSize(line2AxisTitleTextSizeValue); mRenderer.setChartTitleTextSize(line2CharTitleTextSizeValue); mRenderer.setLabelsTextSize(line2LabelsTextSizeValue); mRenderer.setLegendTextSize(line2LegendTextSizeValue); mRenderer.setMargins(new int[] { 12, 25, 12, 12 }); mRenderer.setZoomButtonsVisible(true); mRenderer.setPointSize(10); mRenderer.setClickEnabled(true); mChartView = ChartFactory.getLineChartView(getActivity(), mDataset, mRenderer); mChartView.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint(); if (seriesSelection != null) { switch (type) { case 1: UIFunctionUtils.showMessage(mContext, true, (int) seriesSelection.getValue() + " " + (isMetric ? getString(R.string.long_unit1_detail_4) : getString(R.string.long_unit2_detail_4))); break; case 2: UIFunctionUtils.showMessage(mContext, true, (int) seriesSelection.getValue() + " " + (isMetric ? getString(R.string.long_unit1_detail_2) : getString(R.string.long_unit2_detail_2))); break; } } } }); chartLayout.addView(mChartView); } else { setCorrectText(); } }
From source file:com.chenl.widgets.flippablestackview.indicator.OrientedPagerSlidingTabLayout.java
private static final StateListDrawable createStateDrawable() { StateListDrawable stateListDrawable = new StateListDrawable(); ColorDrawable normal = new ColorDrawable(Color.TRANSPARENT); ColorDrawable pressed = new ColorDrawable(Color.parseColor("#66000000")); stateListDrawable.addState(new int[] { android.R.attr.state_pressed, android.R.attr.state_enabled }, pressed);/* w w w . ja va 2 s. c o m*/ stateListDrawable.addState(new int[] { android.R.attr.state_pressed }, pressed); stateListDrawable.addState(new int[] { android.R.attr.state_enabled }, normal); stateListDrawable.addState(new int[] {}, normal); return stateListDrawable; }
From source file:eu.operando.proxy.OperandoProxyStatus.java
private void updateStatusView() { OperandoProxyStatus proxyStatus = OperandoProxyStatus.STOPPED; OperandoProxyLink proxyLink = OperandoProxyLink.INVALID; boolean isProxyRunning = MainUtil.isServiceRunning(mainContext.getContext(), ProxyService.class); boolean isProxyPaused = MainUtil.isProxyPaused(mainContext); if (isProxyRunning) { if (isProxyPaused) { proxyStatus = OperandoProxyStatus.PAUSED; } else {// w ww. j a va 2 s . c o m proxyStatus = OperandoProxyStatus.ACTIVE; } } try { Proxy proxy = APL.getCurrentHttpProxyConfiguration(); InetSocketAddress proxyAddress = (InetSocketAddress) proxy.address(); if (proxyAddress != null) { //TODO: THIS SHOULD BE DYNAMIC String proxyHost = proxyAddress.getHostName(); int proxyPort = proxyAddress.getPort(); if (proxyHost.equals("127.0.0.1") && proxyPort == 8899) { proxyLink = OperandoProxyLink.VALID; } } } catch (Exception e) { e.printStackTrace(); } String info = ""; try { InputStream is = getResources().openRawResource(R.raw.info_template); info = IOUtils.toString(is); IOUtils.closeQuietly(is); } catch (IOException e) { e.printStackTrace(); } info = info.replace("@@status@@", proxyStatus.name()); info = info.replace("@@link@@", proxyLink.name()); webView.loadDataWithBaseURL("", info, "text/html", "UTF-8", ""); webView.setBackgroundColor(Color.TRANSPARENT); //TRANSPARENT }
From source file:com.liwn.zzl.markbit.DrawOptionsMenuActivity.java
protected void initialiseNewBitmap() { float width = MarkBitApplication.BIT_LCD_WIDTH; float height = MarkBitApplication.BIT_LCD_HEIGHT; Log.d("PAINTROID - MFA", "init new bitmap with: w: " + width + " h:" + height); Bitmap bitmap = Bitmap.createBitmap((int) width, (int) height, Config.ARGB_8888); bitmap.eraseColor(Color.TRANSPARENT); initialiseWithBitmap(bitmap);/* ww w . ja va2s . co m*/ }
From source file:com.android.tv.settings.dialog.DialogFragment.java
private void setContentView(View content) { TextView titleView = (TextView) content.findViewById(R.id.title); TextView breadcrumbView = (TextView) content.findViewById(R.id.breadcrumb); TextView descriptionView = (TextView) content.findViewById(R.id.description); titleView.setText(mTitle);//from w ww.j av a 2s. com breadcrumbView.setText(mBreadcrumb); descriptionView.setText(mDescription); final ImageView iconImageView = (ImageView) content.findViewById(R.id.icon); if (mIconBackgroundColor != Color.TRANSPARENT) { iconImageView.setBackgroundColor(mIconBackgroundColor); } if (AccessibilityHelper.forceFocusableViews(getActivity())) { titleView.setFocusable(true); titleView.setFocusableInTouchMode(true); descriptionView.setFocusable(true); descriptionView.setFocusableInTouchMode(true); breadcrumbView.setFocusable(true); breadcrumbView.setFocusableInTouchMode(true); } if (mIconResourceId != 0) { iconImageView.setImageResource(mIconResourceId); updateViewSize(iconImageView); } else { if (mIconBitmap != null) { iconImageView.setImageBitmap(mIconBitmap); updateViewSize(iconImageView); } else { if (mIconUri != null) { iconImageView.setVisibility(View.INVISIBLE); DrawableDownloader bitmapDownloader = DrawableDownloader.getInstance(content.getContext()); mBitmapCallBack = new BitmapCallback() { @Override public void onBitmapRetrieved(Drawable bitmap) { if (bitmap != null) { mIconBitmap = (bitmap instanceof BitmapDrawable) ? ((BitmapDrawable) bitmap).getBitmap() : null; iconImageView.setVisibility(View.VISIBLE); iconImageView.setImageDrawable(bitmap); updateViewSize(iconImageView); } } }; bitmapDownloader.getBitmap(new BitmapWorkerOptions.Builder(content.getContext()) .resource(mIconUri).width(iconImageView.getLayoutParams().width).build(), mBitmapCallBack); } else { iconImageView.setVisibility(View.GONE); } } } content.setTag(R.id.title, titleView); content.setTag(R.id.breadcrumb, breadcrumbView); content.setTag(R.id.description, descriptionView); content.setTag(R.id.icon, iconImageView); }
From source file:com.ibuildapp.romanblack.MultiContactsPlugin.MultiContactsPlugin.java
/** * Prepares page UI or starts ContactDetailsActivity if there is only one * person.//from w ww.j av a 2 s . com * * @return true if there is only one person, false othrwise */ private boolean prepareUI() { if (persons.size() == 1) { try { Intent details = new Intent(this, ContactDetailsActivity.class); details.putExtra("Widget", widget); details.putExtra("person", persons.get(0)); details.putExtra("single", true); details.putExtra("isdark", Statics.isLight); details.putExtra("hasschema", PluginData.getInstance().isHasColorSchema()); details.putExtra("homebtn", true); finish(); startActivity(details); overridePendingTransition(R.anim.activity_open_translate, R.anim.activity_close_scale); return true; } catch (Exception e) { Log.e(TAG, e.getMessage()); e.printStackTrace(); } } setContentView(R.layout.grouped_contacts_main); setTopBarTitle(TextUtils.isEmpty(widget.getTitle()) ? "" : widget.getTitle()); setTopBarLeftButtonTextAndColor(getResources().getString(R.string.common_home_upper), getResources().getColor(android.R.color.black), true, new View.OnClickListener() { @Override public void onClick(View view) { finish(); overridePendingTransition(R.anim.activity_open_scale, R.anim.activity_close_translate); } }); setTopBarTitleColor(ContextCompat.getColor(this, android.R.color.black)); clearSearch = (ImageView) findViewById(R.id.grouped_contacts_delete_search); separator = findViewById(R.id.gc_head_separator); backSeparator = findViewById(R.id.gc_back_separator); clearSearch.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { searchContactsEditText.setText(""); noFoundText.setVisibility(View.GONE); } }); clearSearch.setVisibility(View.INVISIBLE); resources = getResources(); inputSearchLayout = (RelativeLayout) findViewById(R.id.grouped_contacts_input_search_layout); multicontactsSearchLayout = (LinearLayout) findViewById(R.id.grouped_contacts_search_layout); moveLayout = (LinearLayout) findViewById(R.id.grouped_contacts_move_layout); backSeparator.setBackgroundColor(Statics.color1); if (Statics.isLight) separator.setBackgroundColor(Color.parseColor("#4d000000")); else separator.setBackgroundColor(Color.parseColor("#4dFFFFFF")); ViewUtils.setBackgroundLikeHeader(multicontactsSearchLayout, Statics.color1); multicontactsSearchLayout.setVisibility(View.GONE); searchContactsEditText = (EditText) findViewById(R.id.grouped_contacts_input_search); if (getPackageName().endsWith("p638839")) { searchContactsEditText.setHint("Search by Location"); } searchContactsEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { } }); searchContactsEditText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { if (charSequence.length() == 0) { List<String> cats = PluginData.getInstance().getCategories(); clearSearch.setVisibility(View.INVISIBLE); noFoundText.setVisibility(View.GONE); if (cats.size() > 1) { GroupContactsAdapter adapter = new GroupContactsAdapter(MultiContactsPlugin.this, cats, Statics.isLight); listView.setAdapter(adapter); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { showCategoryPersons(arg2); } }); } else { multicontactsSearchLayout.setVisibility(View.GONE); neededPersons = new ArrayList<>(); neededPersons.addAll(persons); MultiContactsAdapter adapter = new MultiContactsAdapter(MultiContactsPlugin.this, neededPersons, Statics.isLight); listView.setAdapter(adapter); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { showPersonDetails(arg2); } }); listView.setVisibility(View.VISIBLE); } listView.setVisibility(View.VISIBLE); } else { clearSearch.setVisibility(View.VISIBLE); if (!isLeftPostition) { moveToLeft(); isLeftPostition = true; } List<Person> persons = PluginData.getInstance().searchByString(charSequence.toString()); neededPersons = new ArrayList<>(); neededPersons.addAll(persons); if (neededPersons.size() == 0) { noFoundText.setVisibility(View.VISIBLE); listView.setVisibility(View.GONE); } else { MultiContactsAdapter adapter = new MultiContactsAdapter(MultiContactsPlugin.this, neededPersons, Statics.isLight); listView.setAdapter(adapter); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { showPersonDetails(arg2); } }); listView.setDivider(null); listView.setVisibility(View.VISIBLE); noFoundText.setVisibility(View.GONE); } } } @Override public void afterTextChanged(Editable editable) { } }); searchContactsEditText.clearFocus(); cachePath = widget.getCachePath() + "/contacts-" + widget.getOrder(); root = (LinearLayout) findViewById(R.id.grouped_contacts_main_root); listView = (ListView) findViewById(R.id.grouped_contacts_list); listView.setCacheColorHint(Color.TRANSPARENT); listView.setDivider(null); noFoundText = (TextView) findViewById(R.id.no_found_text); noFoundText.setTextColor(Statics.color3); progressDialog = ProgressDialog.show(this, null, getString(R.string.common_loading_upper), true); progressDialog.setCancelable(true); progressDialog.setOnCancelListener(new OnCancelListener() { public void onCancel(DialogInterface di) { handler.sendEmptyMessage(LOADING_ABORTED); } }); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); return false; }