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.sentaroh.android.SMBExplorer.SMBExplorerMain.java
private void processRemoteUpButton() { if (remoteDirHist.size() > 0) { if (remoteCurrFLI != null) { remoteCurrFLI.pos_fv = remoteFileListView.getFirstVisiblePosition(); if (remoteFileListView.getChildAt(0) != null) remoteCurrFLI.pos_top = remoteFileListView.getChildAt(0).getTop(); }/*from www . j a va2 s . c o m*/ if (remoteDirHist.size() <= 2) { processRemoteTopButton(); remoteFileListUpBtn.setEnabled(false); } else { // String c_dir=remoteDirHist.get(remoteDirHist.size()-1); removeDirHist(remoteBase, remoteDir, remoteDirHist); String t_dir = getLastDirHist(remoteDirHist); FileListCacheItem dhi = getFileListCache(t_dir, remoteFileListCache); remoteBase = dhi.base; remoteDir = dhi.directory.replace(dhi.base + "/", ""); remoteFileListAdapter.setDataList(dhi.file_list); remoteFileListAdapter.notifyDataSetChanged(); setFileListPathName(remoteFileListPathBtn, remoteFileListCache, remoteBase, remoteDir); remoteFileListView.setSelectionFromTop(dhi.pos_fv, dhi.pos_top); setEmptyFolderView(); remoteCurrFLI = dhi; for (int j = 0; j < remoteFileListView.getChildCount(); j++) remoteFileListView.getChildAt(j).setBackgroundColor(Color.TRANSPARENT); } } }
From source file:com.lifehackinnovations.siteaudit.FloorPlanActivity.java
public void highlightbutton(View arg0) { try {/*from w ww . java 2s . c om*/ RelativeLayout parent = ((RelativeLayout) arg0.getParent()); for (int child = 0; child < parent.getChildCount(); child++) { parent.getChildAt(child).setBackgroundColor(Color.TRANSPARENT); } } catch (Throwable e) { LinearLayout parent = ((LinearLayout) arg0.getParent()); for (int child = 0; child < parent.getChildCount(); child++) { parent.getChildAt(child).setBackgroundColor(Color.TRANSPARENT); } } arg0.setBackgroundColor(Color.parseColor("#501BADA9")); }
From source file:com.sentaroh.android.SMBExplorer.SMBExplorerMain.java
private void processRemoteTopButton() { if (remoteDirHist.size() > 0) { if (remoteCurrFLI != null) { remoteCurrFLI.pos_fv = remoteFileListView.getFirstVisiblePosition(); if (remoteFileListView.getChildAt(0) != null) remoteCurrFLI.pos_top = remoteFileListView.getChildAt(0).getTop(); }/*from w ww.ja va 2s . c om*/ String t_dir = getTopDirHist(remoteDirHist); FileListCacheItem dhi = getFileListCache(t_dir, remoteFileListCache); remoteDir = ""; remoteBase = dhi.base; remoteFileListAdapter.setDataList(dhi.file_list); clearDirHist(remoteDirHist); putDirHist(t_dir, "", remoteDirHist); remoteFileListAdapter.notifyDataSetChanged(); setFileListPathName(remoteFileListPathBtn, remoteFileListCache, remoteBase, remoteDir); remoteFileListView.setSelectionFromTop(dhi.pos_fv, dhi.pos_top); setEmptyFolderView(); remoteCurrFLI = dhi; for (int j = 0; j < remoteFileListView.getChildCount(); j++) remoteFileListView.getChildAt(j).setBackgroundColor(Color.TRANSPARENT); remoteFileListTopBtn.setEnabled(false); } }
From source file:com.amaze.filemanager.activities.MainActivity.java
void initialiseViews() { appBarLayout = (AppBarLayout) findViewById(R.id.lin); if (!ImageLoader.getInstance().isInited()) { ImageLoader.getInstance().init(ImageLoaderConfiguration.createDefault(this)); }/* w ww .ja v a 2 s . c om*/ displayImageOptions = new DisplayImageOptions.Builder().showImageOnLoading(R.drawable.amaze_header) .showImageForEmptyUri(R.drawable.amaze_header).showImageOnFail(R.drawable.amaze_header) .cacheInMemory(true).cacheOnDisk(true).considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565) .build(); buttonBarFrame = (FrameLayout) findViewById(R.id.buttonbarframe); buttonBarFrame.setBackgroundColor(Color.parseColor(skin)); drawerHeaderLayout = getLayoutInflater().inflate(R.layout.drawerheader, null); drawerHeaderParent = (RelativeLayout) drawerHeaderLayout.findViewById(R.id.drawer_header_parent); drawerHeaderView = (View) drawerHeaderLayout.findViewById(R.id.drawer_header); drawerHeaderView.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { Intent intent; if (Build.VERSION.SDK_INT < 19) { intent = new Intent(); intent.setAction(Intent.ACTION_GET_CONTENT); } else { intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); } intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("image/*"); startActivityForResult(intent, image_selector_request_code); return false; } }); drawerProfilePic = (RoundedImageView) drawerHeaderLayout.findViewById(R.id.profile_pic); mGoogleName = (TextView) drawerHeaderLayout.findViewById(R.id.account_header_drawer_name); mGoogleId = (TextView) drawerHeaderLayout.findViewById(R.id.account_header_drawer_email); toolbar = (Toolbar) findViewById(R.id.action_bar); setSupportActionBar(toolbar); frameLayout = (FrameLayout) findViewById(R.id.content_frame); indicator_layout = findViewById(R.id.indicator_layout); mDrawerLinear = (ScrimInsetsRelativeLayout) findViewById(R.id.left_drawer); if (theme1 == 1) mDrawerLinear.setBackgroundColor(Color.parseColor("#303030")); else mDrawerLinear.setBackgroundColor(Color.WHITE); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerLayout.setStatusBarBackgroundColor(Color.parseColor(skin)); mDrawerList = (ListView) findViewById(R.id.menu_drawer); drawerHeaderView.setBackgroundResource(R.drawable.amaze_header); drawerHeaderParent.setBackgroundColor(Color.parseColor(skin)); if (findViewById(R.id.tab_frame) != null) { mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN, mDrawerLinear); mDrawerLayout.setScrimColor(Color.TRANSPARENT); isDrawerLocked = true; } mDrawerList.addHeaderView(drawerHeaderLayout); getSupportActionBar().setDisplayShowTitleEnabled(false); View v = findViewById(R.id.fab_bg); if (theme1 == 1) v.setBackgroundColor(Color.parseColor("#a6ffffff")); v.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { floatingActionButton.close(true); revealShow(view, false); } }); pathbar = (LinearLayout) findViewById(R.id.pathbar); buttons = (LinearLayout) findViewById(R.id.buttons); scroll = (HorizontalScrollView) findViewById(R.id.scroll); scroll1 = (HorizontalScrollView) findViewById(R.id.scroll1); scroll.setSmoothScrollingEnabled(true); scroll1.setSmoothScrollingEnabled(true); ImageView divider = (ImageView) findViewById(R.id.divider1); if (theme1 == 0) divider.setImageResource(R.color.divider); else divider.setImageResource(R.color.divider_dark); setDrawerHeaderBackground(); View settingsbutton = findViewById(R.id.settingsbutton); if (theme1 == 1) { settingsbutton.setBackgroundResource(R.drawable.safr_ripple_black); ((ImageView) settingsbutton.findViewById(R.id.settingicon)) .setImageResource(R.drawable.ic_settings_white_48dp); ((TextView) settingsbutton.findViewById(R.id.settingtext)) .setTextColor(getResources().getColor(android.R.color.white)); } settingsbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent in = new Intent(MainActivity.this, Preferences.class); finish(); final int enter_anim = android.R.anim.fade_in; final int exit_anim = android.R.anim.fade_out; Activity s = MainActivity.this; s.overridePendingTransition(exit_anim, enter_anim); s.finish(); s.overridePendingTransition(enter_anim, exit_anim); s.startActivity(in); } }); View appbutton = findViewById(R.id.appbutton); if (theme1 == 1) { appbutton.setBackgroundResource(R.drawable.safr_ripple_black); ((ImageView) appbutton.findViewById(R.id.appicon)).setImageResource(R.drawable.ic_doc_apk_white); ((TextView) appbutton.findViewById(R.id.apptext)) .setTextColor(getResources().getColor(android.R.color.white)); } appbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { android.support.v4.app.FragmentTransaction transaction2 = getSupportFragmentManager() .beginTransaction(); transaction2.replace(R.id.content_frame, new AppsList()); findViewById(R.id.lin).animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)) .start(); pending_fragmentTransaction = transaction2; if (!isDrawerLocked) mDrawerLayout.closeDrawer(mDrawerLinear); else onDrawerClosed(); select = -2; adapter.toggleChecked(false); } }); getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(skin))); // status bar0 sdk = Build.VERSION.SDK_INT; if (sdk == 20 || sdk == 19) { SystemBarTintManager tintManager = new SystemBarTintManager(this); tintManager.setStatusBarTintEnabled(true); tintManager.setStatusBarTintColor(Color.parseColor(skin)); FrameLayout.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) findViewById(R.id.drawer_layout) .getLayoutParams(); SystemBarTintManager.SystemBarConfig config = tintManager.getConfig(); if (!isDrawerLocked) p.setMargins(0, config.getStatusBarHeight(), 0, 0); } else if (Build.VERSION.SDK_INT >= 21) { colourednavigation = Sp.getBoolean("colorednavigation", true); Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); //window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); if (isDrawerLocked) { window.setStatusBarColor((skinStatusBar)); } else window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); if (colourednavigation) window.setNavigationBarColor(skinStatusBar); } }
From source file:de.vanita5.twittnuker.util.Utils.java
public static int getCardHighlightColor(final boolean is_mention, final boolean is_favorite, final boolean is_retweet) { if (is_mention) { return HOLO_BLUE_LIGHT; } else if (is_favorite) { return HOLO_ORANGE_LIGHT; } else if (is_retweet) { return HOLO_GREEN_LIGHT; }/*from w w w . j av a 2 s . c om*/ return Color.TRANSPARENT; }
From source file:com.sentaroh.android.SMBExplorer.SMBExplorerMain.java
private void setLocalFilelistItemClickListener() { if (localFileListView == null) return;/* w w w . j av a2 s. c om*/ localFileListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { for (int j = 0; j < parent.getChildCount(); j++) parent.getChildAt(j).setBackgroundColor(Color.TRANSPARENT); FileListItem item = localFileListAdapter.getItem(position); if (!isUiEnabled()) return; if (localFileListAdapter.isItemSelected()) { item.setChecked(!item.isChecked()); localFileListAdapter.notifyDataSetChanged(); } else { setUiEnabled(false); sendDebugLogMsg(1, "I", "Local filelist item clicked :" + item.getName()); if (item.isDir()) { FileListCacheItem dhi_c = getFileListCache(item.getPath() + "/" + item.getName(), localFileListCache); ArrayList<FileListItem> tfl = null; if (dhi_c == null) { tfl = createLocalFileList(false, item.getPath() + "/" + item.getName()); } else { tfl = dhi_c.file_list; } if (tfl == null) return; String t_dir = item.getPath() + "/" + item.getName(); localCurrFLI.pos_fv = localFileListView.getFirstVisiblePosition(); if (localFileListView.getChildAt(0) != null) localCurrFLI.pos_top = localFileListView.getChildAt(0).getTop(); localDir = t_dir.replace(localBase + "/", ""); localFileListAdapter.setDataList(tfl); localFileListAdapter.notifyDataSetChanged(); for (int j = 0; j < localFileListView.getChildCount(); j++) localFileListView.getChildAt(j).setBackgroundColor(Color.TRANSPARENT); setFilelistCurrDir(localFileListDirSpinner, localBase, localDir); setFileListPathName(localFileListPathBtn, localFileListCache, localBase, localDir); setEmptyFolderView(); localFileListView.setSelection(0); putDirHist(localBase, localDir, localDirHist); if (dhi_c == null) { FileListCacheItem dhi = new FileListCacheItem(); dhi.profile_name = localBase; dhi = new FileListCacheItem(); dhi = new FileListCacheItem(); dhi.base = localBase; dhi.directory = item.getPath() + "/" + item.getName(); dhi.file_list = tfl; dhi.directory_history.addAll(localDirHist); putFileListCache(dhi, localFileListCache); localCurrFLI = dhi; } else { localCurrFLI = dhi_c; } localFileListTopBtn.setEnabled(true); localFileListUpBtn.setEnabled(true); setUiEnabled(true); } else { if (isFileListItemSelected(localFileListAdapter)) { item.setChecked(!item.isChecked()); localFileListAdapter.notifyDataSetChanged(); setUiEnabled(true); } else { setUiEnabled(true); startLocalFileViewerIntent(item); } } } } }); }
From source file:com.filemanager.free.activities.MainActivity.java
@SuppressLint("InflateParams") private void initialiseViews() { mCoordinatorLayout = (CoordinatorLayout) findViewById(R.id.main_frame); appBarLayout = (AppBarLayout) findViewById(R.id.lin); if (!ImageLoader.getInstance().isInited()) { ImageLoader.getInstance().init(ImageLoaderConfiguration.createDefault(this)); }//from w w w.jav a 2 s.c om if (displayImageOptions != null) { displayImageOptions = new DisplayImageOptions.Builder().showImageOnLoading(R.drawable.amaze_header) .showImageForEmptyUri(R.drawable.amaze_header).showImageOnFail(R.drawable.amaze_header) .cacheInMemory(true).cacheOnDisk(true).considerExifParams(true) .bitmapConfig(Bitmap.Config.RGB_565).build(); } buttonBarFrame = (FrameLayout) findViewById(R.id.buttonbarframe); buttonBarFrame.setBackgroundColor(Color.parseColor(skin)); drawerHeaderLayout = getLayoutInflater().inflate(R.layout.drawerheader, null); drawerHeaderParent = (RelativeLayout) drawerHeaderLayout.findViewById(R.id.drawer_header_parent); drawerHeaderView = (View) drawerHeaderLayout.findViewById(R.id.drawer_header); drawerHeaderView.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { Intent intent; if (Build.VERSION.SDK_INT < 19) { intent = new Intent(); intent.setAction(Intent.ACTION_GET_CONTENT); } else { intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); } intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("image/*"); startActivityForResult(intent, image_selector_request_code); return false; } }); drawerProfilePic = (RoundedImageView) drawerHeaderLayout.findViewById(R.id.profile_pic); mGoogleName = (TextView) drawerHeaderLayout.findViewById(R.id.account_header_drawer_name); mGoogleId = (TextView) drawerHeaderLayout.findViewById(R.id.account_header_drawer_email); toolbar = (Toolbar) findViewById(R.id.action_bar); setSupportActionBar(toolbar); frameLayout = (FrameLayout) findViewById(R.id.content_frame); indicator_layout = findViewById(R.id.indicator_layout); mDrawerLinear = (ScrimInsetsRelativeLayout) findViewById(R.id.left_drawer); if (theme1 == 1) mDrawerLinear.setBackgroundColor(Color.parseColor("#303030")); else { assert mDrawerLinear != null; mDrawerLinear.setBackgroundColor(Color.WHITE); } mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerLayout.setStatusBarBackgroundColor(Color.parseColor(skin)); mDrawerList = (ListView) findViewById(R.id.menu_drawer); drawerHeaderView.setBackgroundResource(R.drawable.amaze_header); drawerHeaderParent.setBackgroundColor(Color.parseColor(skin)); if (findViewById(R.id.tab_frame) != null) { mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN, mDrawerLinear); mDrawerLayout.setScrimColor(Color.TRANSPARENT); isDrawerLocked = true; } mDrawerList.addHeaderView(drawerHeaderLayout); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayShowTitleEnabled(false); } View v = findViewById(R.id.fab_bg); if (theme1 == 1) { assert v != null; v.setBackgroundColor(Color.parseColor("#a6ffffff")); } assert v != null; v.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { floatingActionButton.close(true); utils.revealShow(view, false); } }); pathbar = (LinearLayout) findViewById(R.id.pathbar); buttons = (LinearLayout) findViewById(R.id.buttons); scroll = (HorizontalScrollView) findViewById(R.id.scroll); scroll1 = (HorizontalScrollView) findViewById(R.id.scroll1); scroll.setSmoothScrollingEnabled(true); scroll1.setSmoothScrollingEnabled(true); ImageView divider = (ImageView) findViewById(R.id.divider1); if (theme1 == 0) { assert divider != null; divider.setImageResource(R.color.divider); } else { assert divider != null; divider.setImageResource(R.color.divider_dark); } setDrawerHeaderBackground(); View settingsbutton = findViewById(R.id.settingsbutton); if (theme1 == 1) { assert settingsbutton != null; settingsbutton.setBackgroundResource(R.drawable.safr_ripple_black); ((ImageView) settingsbutton.findViewById(R.id.settingicon)) .setImageResource(R.drawable.ic_settings_white_48dp); ((TextView) settingsbutton.findViewById(R.id.settingtext)) .setTextColor(ContextCompat.getColor(con, android.R.color.white)); } assert settingsbutton != null; settingsbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent in = new Intent(MainActivity.this, Preferences.class); finish(); final int enter_anim = android.R.anim.fade_in; final int exit_anim = android.R.anim.fade_out; Activity s = MainActivity.this; s.overridePendingTransition(exit_anim, enter_anim); s.finish(); s.overridePendingTransition(enter_anim, exit_anim); s.startActivity(in); } }); View appbutton = findViewById(R.id.appbutton); if (theme1 == 1) { assert appbutton != null; appbutton.setBackgroundResource(R.drawable.safr_ripple_black); ((ImageView) appbutton.findViewById(R.id.appicon)).setImageResource(R.drawable.ic_doc_apk_white); ((TextView) appbutton.findViewById(R.id.apptext)) .setTextColor(ContextCompat.getColor(con, android.R.color.white)); } assert appbutton != null; appbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { android.support.v4.app.FragmentTransaction transaction2 = getSupportFragmentManager() .beginTransaction(); transaction2.replace(R.id.content_frame, new AppsList()); findViewById(R.id.lin).animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)) .start(); pending_fragmentTransaction = transaction2; if (!isDrawerLocked) mDrawerLayout.closeDrawer(mDrawerLinear); else onDrawerClosed(); select = -2; adapter.toggleChecked(false); } }); getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(skin))); // status bar0 sdk = Build.VERSION.SDK_INT; if (sdk == 20 || sdk == 19) { SystemBarTintManager tintManager = new SystemBarTintManager(this); tintManager.setStatusBarTintEnabled(true); tintManager.setStatusBarTintColor(Color.parseColor(skin)); FrameLayout.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) findViewById(R.id.drawer_layout) .getLayoutParams(); SystemBarTintManager.SystemBarConfig config = tintManager.getConfig(); if (!isDrawerLocked) p.setMargins(0, config.getStatusBarHeight(), 0, 0); } else if (Build.VERSION.SDK_INT >= 21) { colourednavigation = Sp.getBoolean("colorednavigation", true); Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); //window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); if (isDrawerLocked) { window.setStatusBarColor((skinStatusBar)); } else window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); if (colourednavigation) window.setNavigationBarColor(skinStatusBar); } //admob mAdView = (View) findViewById(R.id.ads); }
From source file:com.skytree.epubtest.BookViewActivity.java
public void makeListBox() { this.listBox = new SkyLayout(this); listBox.setBackgroundColor(Color.TRANSPARENT); // listBox.setBackgroundColor(this.themes.get(this.themeIndex).backgroundColor | 0xD0000000); listTopButton = new Button(this); listTopButton.setId(9009);/* w w w . j a v a 2 s.c om*/ listTopButton.setOnClickListener(listener); listTopButton.setBackgroundColor(Color.TRANSPARENT); GradientDrawable gradForChecked = new GradientDrawable(Orientation.TOP_BOTTOM, new int[] { 0xff407ee6, 0xff6ca2f9 }); GradientDrawable grad = new GradientDrawable(Orientation.TOP_BOTTOM, new int[] { 0xfff4f4f4, 0xffcdcdcd }); this.contentListButton = new Button(this); this.contentListButton.setId(2700); this.contentListButton.setOnClickListener(listener); this.contentListButton.setText(getString(R.string.contents)); this.contentListButton.setTextSize(13); this.bookmarkListButton = new Button(this); this.bookmarkListButton.setId(2701); this.bookmarkListButton.setOnClickListener(listener); this.bookmarkListButton.setText(getString(R.string.bookmark)); this.bookmarkListButton.setTextSize(13); this.highlightListButton = new Button(this); this.highlightListButton.setId(2702); this.highlightListButton.setOnClickListener(listener); this.highlightListButton.setText(getString(R.string.highlight)); this.highlightListButton.setTextSize(13); this.listScrollView = new ScrollView(this); this.listView = new LinearLayout(this); listView.setOrientation(LinearLayout.VERTICAL); this.listBox.addView(listTopButton); this.listBox.addView(contentListButton); this.listBox.addView(bookmarkListButton); this.listBox.addView(highlightListButton); this.listBox.addView(listScrollView); this.listScrollView.addView(listView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); this.ePubView.addView(this.listBox); this.hideListBox(); }
From source file:com.dwdesign.tweetings.util.Utils.java
public static int getUserColor(final Context context, final long user_id) { if (context == null) return Color.TRANSPARENT; Integer color = sUserColors.get(user_id); if (color == null) { final SharedPreferences prefs = context.getSharedPreferences(USER_COLOR_PREFERENCES_NAME, Context.MODE_PRIVATE); color = prefs.getInt(Long.toString(user_id), Color.TRANSPARENT); sUserColors.put(user_id, color); }// w w w.j av a 2 s. c om return color != null ? color : Color.TRANSPARENT; }