Skip to content

Commit

Permalink
master: enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
knight-rider1609 committed Jul 23, 2019
1 parent ce8930c commit de5e43a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
Expand Up @@ -2,6 +2,7 @@

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

import com.aseem.versatileprogressbar.ProgBar;

Expand All @@ -13,6 +14,5 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progBar = findViewById(R.id.myProgBar);
progBar.setProgressVector(getDrawable(R.drawable.infinity_bar));
}
}
4 changes: 1 addition & 3 deletions app/src/main/res/layout/activity_main.xml
Expand Up @@ -21,8 +21,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:barType="@drawable/bouncy_balls"
app:text="Please wait..."
app:textSize="18sp"
app:enlarge="3"/>
android:elevation="10dp"/>

</android.support.constraint.ConstraintLayout>
Expand Up @@ -66,7 +66,7 @@ private void initView(){
setProgressVector(imageFile);
}

if (customMsg!=null && !customMsg.isEmpty()){
if (customMsg!=null){
setTextMsg(customMsg);
}

Expand All @@ -93,12 +93,6 @@ public void enlarge(int enlarge){
imageView.getLayoutParams().height = enlarge*100;
}

public void setAlpha(double alpha){
if (alpha>=0 && alpha<=1){
progBg.setAlpha((float)alpha);
}
}

public void setTextMsg(String message){
textMsg.setText(message);
}
Expand Down
Expand Up @@ -15,7 +15,8 @@
android:id="@+id/progressImg"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_centerInParent="true"/>
android:layout_centerInParent="true"
android:scaleType="centerInside"/>

<TextView
android:id="@+id/textMsg"
Expand Down

0 comments on commit de5e43a

Please sign in to comment.