android - How to put a ProgressBar ontop of a View -
i trying put progressbar
on top of view
in layout, have looked solution couldn't find 1 online, there way me achieve outcome ?
here layout:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:background="#dedede" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="apps.radwin.wintouch.activities.alignmentactivities.testings_activity" tools:showin="@layout/app_bar_testings_"> <view android:layout_width="300dp" android:layout_height="150dp" android:background="#ffffff" android:id="@+id/mainwhiteview" style="@style/widget.appcompat.button.colored" android:layout_margintop="50dp" android:layout_below="@+id/testings_screen_mainheadline" android:layout_centerhorizontal="true" /> <view android:layout_width="145dp" android:layout_height="150dp" android:background="#ffffff" android:id="@+id/mainwhiteview2" style="@style/widget.appcompat.button.colored" android:layout_margintop="10dp" android:layout_below="@+id/mainwhiteview" android:layout_alignend="@+id/mainwhiteview" android:layout_marginleft="20dp" android:layout_centerhorizontal="true" /> <view android:layout_width="145dp" android:layout_height="150dp" android:background="#ffffff" android:id="@+id/mainwhiteview3" style="@style/widget.appcompat.button.colored" android:layout_margintop="10dp" android:layout_below="@+id/mainwhiteview" android:layout_alignstart="@+id/mainwhiteview" android:layout_centerhorizontal="true" /> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="return main menu" android:id="@+id/testings_screen_returntomainmenu" style="@style/widget.appcompat.button.colored" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:textappearance="?android:attr/textappearancelarge" android:text="large text" android:textsize="30dp" android:textcolor="#000000" android:layout_margintop="20dp" android:id="@+id/testings_screen_mainheadline" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" /> <progressbar style="?android:attr/progressbarstylehorizontal" android:layout_width="300dp" android:layout_height="50dp" android:progress="40" android:id="@+id/progressbar" android:layout_aligntop="@+id/mainwhiteview" android:layout_alignstart="@+id/mainwhiteview" /> </relativelayout>
it suppose show progressbar
doesn't. know how fix ?
you have set elevation
progressbar
element, try this:
<progressbar style="?android:attr/progressbarstylehorizontal" android:layout_width="300dp" android:layout_height="50dp" android:progress="40" android:id="@+id/progressbar" android:layout_aligntop="@+id/mainwhiteview" android:layout_alignstart="@+id/mainwhiteview" android:elevation="10dp" />
check answer additional informations.
Comments
Post a Comment