Java Code Examples for android.widget.TextView#setElevation()
The following examples show how to use
android.widget.TextView#setElevation() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: rcloneExplorer File: BreadcrumbView.java License: MIT License | 5 votes |
public void addCrumb(String crumbTitle, final String path) { if (numberOfCrumbs >= 1) { addArrow(path); previousCrumb.setTypeface(null, Typeface.NORMAL); previousCrumb.setElevation(0); } numberOfCrumbs++; final TextView textViewCrumb = new TextView(context); textViewCrumb.setText(crumbTitle); textViewCrumb.setTypeface(null, Typeface.BOLD); textViewCrumb.setTextColor(getResources().getColor(R.color.white)); TypedValue outValue = new TypedValue(); getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackgroundBorderless, outValue, true); textViewCrumb.setBackgroundResource(outValue.resourceId); textViewCrumb.setPadding( 8, 8, 8, 0); textViewCrumb.setElevation(50); textViewCrumb.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onClickListener.onBreadCrumbClicked(path); } }); previousCrumb = textViewCrumb; pathList.add(path); textViewMap.put(path, textViewCrumb); childFrame.addView(textViewCrumb); childFrame.post(new Runnable() { @Override public void run() { smoothScrollTo(textViewCrumb.getLeft() - 50, 0); } }); }
Example 2
Source Project: RxTools-master File: RxPopupViewManager.java License: Apache License 2.0 | 5 votes |
private void setTipViewElevation(TextView tipView, RxPopupView rxPopupView) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (rxPopupView.getElevation() > 0) { ViewOutlineProvider viewOutlineProvider = new ViewOutlineProvider() { @SuppressLint("NewApi") @Override public void getOutline(View view, Outline outline) { outline.setEmpty(); } }; tipView.setOutlineProvider(viewOutlineProvider); tipView.setElevation(rxPopupView.getElevation()); } } }
Example 3
Source Project: FaceT File: CaptureActivity.java License: Mozilla Public License 2.0 | 5 votes |
private void selectEffect(ImageButton selectButton, TextView selectText) { for (int i = 0; i < 4; i++) { imageButtons[i].setElevation(0.0f); textViews[i].setElevation(0.0f); textViews[i].setTypeface(null, Typeface.NORMAL); textViews[i].setTextSize(12.0f); } selectButton.setElevation(20.0f); selectText.setElevation(20.0f); selectText.setTypeface(null, Typeface.BOLD); selectText.setTextSize(18.0f); }