Skip to content

Commit

Permalink
update function
Browse files Browse the repository at this point in the history
  • Loading branch information
秋逸 committed Dec 26, 2016
1 parent 5a672cd commit 4bc9d4d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions VonTools/src/main/java/com/vondear/vontools/VonFragmentUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.vondear.vontools;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

/**
* Created by vonde on 2016/12/26.
*/

public class VonFragmentUtils {

public static void initFragment(FragmentActivity fragmentActivity,Fragment fragment,int r_id_fragment) {
FragmentManager fragmentManager = fragmentActivity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(r_id_fragment, fragment);
fragmentTransaction.commit();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public RoundProgressBar(Context context, AttributeSet attrs, int defStyle) {
roundColor = mTypedArray.getColor(R.styleable.RoundProgressBar_roundColor, Color.WHITE);
roundProgressColor = mTypedArray.getColor(R.styleable.RoundProgressBar_roundProgressColor, Color.parseColor("#F6B141"));
textColor = mTypedArray.getColor(R.styleable.RoundProgressBar_textColor, Color.GREEN);
textSize = mTypedArray.getDimension(R.styleable.RoundProgressBar_textSize, 15);
textSize = mTypedArray.getDimension(R.styleable.RoundProgressBar_textSize1, 15);
roundWidth = mTypedArray.getDimension(R.styleable.RoundProgressBar_roundWidth, 20);
max = mTypedArray.getInteger(R.styleable.RoundProgressBar_max, 100);
textIsDisplayable = mTypedArray.getBoolean(R.styleable.RoundProgressBar_textIsDisplayable, true);
Expand Down
2 changes: 1 addition & 1 deletion VonTools/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<attr name="roundProgressColor" format="color" />
<attr name="roundWidth" format="dimension"></attr>
<attr name="textColor" format="color" />
<attr name="textSize" format="dimension" />
<attr name="textSize1" format="dimension" />
<attr name="max" format="integer"></attr>
<attr name="textIsDisplayable" format="boolean"></attr>
<attr name="style">
Expand Down

0 comments on commit 4bc9d4d

Please sign in to comment.