Skip to content

Commit

Permalink
change[]: change BottleViewLoading to GABottleViewLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajian-studio committed Jan 4, 2017
1 parent 7ecb1b3 commit e45e69b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* 技术交流qq群:277582728
*/

public class BottleLoadingView extends View {
public class GABottleLoadingView extends View {

private class PointWithAngle {
public int x;
Expand Down Expand Up @@ -268,20 +268,20 @@ private void initPoint() {
private int mDebugPointRadius;
private Paint mDebugPaint;

public BottleLoadingView(Context context) {
public GABottleLoadingView(Context context) {
this(context, null);
}

public BottleLoadingView(Context context, AttributeSet attrs) {
public GABottleLoadingView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

public BottleLoadingView(Context context, AttributeSet attrs, int defStyleAttr) {
public GABottleLoadingView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
TypedArray typedArray = context.obtainStyledAttributes(attrs,
R.styleable.BottleLoadingView, defStyleAttr, 0);
mBottleColor = typedArray.getColor(R.styleable.BottleLoadingView_bottle_color, DEFAULT_BOTTLE_COLOR);
mWaterColor = typedArray.getColor(R.styleable.BottleLoadingView_water_color, DEFAULT_WATER_COLOR);
R.styleable.GABottleLoadingView, defStyleAttr, 0);
mBottleColor = typedArray.getColor(R.styleable.GABottleLoadingView_bottle_color, DEFAULT_BOTTLE_COLOR);
mWaterColor = typedArray.getColor(R.styleable.GABottleLoadingView_water_color, DEFAULT_WATER_COLOR);
init();
}

Expand Down
2 changes: 1 addition & 1 deletion library/src/main/res/values/attr.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<declare-styleable name="BottleLoadingView">
<declare-styleable name="GABottleLoadingView">

<attr name="bottle_color" format="color" />
<attr name="water_color" format="color" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* qq:1935400187
* 技术交流qq群:277582728
*/
import com.gastudio.gabottleloading.library.BottleLoadingView;
import com.gastudio.gabottleloading.library.GABottleLoadingView;

public class MainActivity extends Activity {

Expand All @@ -37,8 +37,8 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
protected void onResume() {
super.onResume();
((BottleLoadingView) findViewById(R.id.bottle_view_small)).performAnimation();
((BottleLoadingView) findViewById(R.id.bottle_view_middle)).performAnimation();
((BottleLoadingView) findViewById(R.id.bottle_view_big)).performAnimation();
((GABottleLoadingView) findViewById(R.id.bottle_view_small)).performAnimation();
((GABottleLoadingView) findViewById(R.id.bottle_view_middle)).performAnimation();
((GABottleLoadingView) findViewById(R.id.bottle_view_big)).performAnimation();
}
}
6 changes: 3 additions & 3 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
android:layout_weight="1"
android:orientation="horizontal">

<com.gastudio.gabottleloading.library.BottleLoadingView
<com.gastudio.gabottleloading.library.GABottleLoadingView
android:id="@+id/bottle_view_small"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />

<com.gastudio.gabottleloading.library.BottleLoadingView
<com.gastudio.gabottleloading.library.GABottleLoadingView
android:id="@+id/bottle_view_middle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
</LinearLayout>

<com.gastudio.gabottleloading.library.BottleLoadingView
<com.gastudio.gabottleloading.library.GABottleLoadingView
android:id="@+id/bottle_view_big"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand Down

0 comments on commit e45e69b

Please sign in to comment.