Skip to content

Commit

Permalink
Fixed inflated coordinates when the problem of confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
gaopengfei committed Oct 8, 2016
1 parent b5e8481 commit 2260f91
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ private float getCircleWidth() {
}

private void refershUnreachedWidth() {
mUnreachedRadius = (getWidth() - getPaddingLeft() - getPaddingRight() - mUnreachedWidth) / 2;
mUnreachedRadius = (getMeasuredWidth() - getPaddingLeft() - getPaddingRight() - mUnreachedWidth) / 2;
}

private void refershWheelCurPosition(double cos) {
Expand Down
3 changes: 2 additions & 1 deletion simple/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
android:name=".UnionActivity"
android:label="@string/title_activity_union"
android:theme="@style/AppTheme"/>
<activity android:name=".SetProcessActivity"></activity>
<activity android:name=".SetProcessActivity"/>
<activity android:name=".InflateActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package test.io.feeeei.circleseekbar;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import io.feeeei.circleseekbar.CircleSeekBar;

public class InflateActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new CircleSeekBar(this));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class MainActivity extends AppCompatActivity {
private ListView mListView;

private Class[] mClasses = new Class[] {Style1Activity.class, Style2Activity.class, WithShadowActivity.class,
SetProcessActivity.class, WithTextActivity.class, DownLoadActivity.class, UnionActivity.class};
SetProcessActivity.class, WithTextActivity.class, DownLoadActivity.class, UnionActivity.class,
InflateActivity.class};

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down

0 comments on commit 2260f91

Please sign in to comment.