Custom Drawable for ProgressBar/ProgressDialog

I used the following for creating a custom progress bar. File res/drawable/progress_bar_states.xml declares the colors of the different states: <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:id=”@android:id/background”> <shape> <gradient android:startColor=”#000001″ android:centerColor=”#0b131e” android:centerY=”0.75″ android:endColor=”#0d1522″ android:angle=”270″ /> </shape> </item> <item android:id=”@android:id/secondaryProgress”> <clip> <shape> <gradient android:startColor=”#234″ android:centerColor=”#234″ android:centerY=”0.75″ android:endColor=”#a24″ android:angle=”270″ /> </shape> </clip> </item> <item android:id=”@android:id/progress”> <clip> <shape> <gradient android:startColor=”#144281″ android:centerColor=”#0b1f3c” android:centerY=”0.75″ … Read more

ProgressDialog is deprecated.What is the alternate one to use?

Yes, in API level 26 it’s deprecated. Instead, you can use progressBar. To create it programmatically: First get a reference to the root layout RelativeLayout layout = findViewById(R.id.display); //specify here Root layout Id or RelativeLayout layout = findViewById(this); Then add the progress bar progressBar = new ProgressBar(youractivity.this, null, android.R.attr.progressBarStyleLarge); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(100, 100); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)