Coder Social home page Coder Social logo

Comments (10)

chihane avatar chihane commented on September 26, 2024

#6

from androidwheelview.

dotfeng avatar dotfeng commented on September 26, 2024

如何实现居中对齐呢?

from androidwheelview.

chihane avatar chihane commented on September 26, 2024

这个 -> LoopView.java

是我之前同时做的另一个反混淆工程,做了居中处理。

可以参考绘制文字用的画笔的初始化和onDraw方法里面绘制文字部分的代码。

概括来说就是指定画笔的文字对齐为居中,然后绘制原点从左下角改为中间。

另外中间项放大的效果我注释掉了,在78行,需要的话可以自行处理。

from androidwheelview.

mr235 avatar mr235 commented on September 26, 2024

@dotfeng 改成居中显示了

@mlxy 为啥你可以直接提交代码,而我却不行呢,平时工作中用svn,没用git。

from androidwheelview.

chihane avatar chihane commented on September 26, 2024

@mr235 『直接提交代码』是指什么……?

from androidwheelview.

mr235 avatar mr235 commented on September 26, 2024

@mlxy 我得pull requests才能合到 weidongjian的主线上啊,看你好像是直接就能提交上去了,你的名字都在他的contributors里,我的好像没有

from androidwheelview.

chihane avatar chihane commented on September 26, 2024

@mr235 你也在啊……

是要PR然后被合并才能提交上的,我上面发的是当初我自己克隆的工程


另外想要直接提交也是可以的,在repo设置的Collaborators里加上的人貌似就可以直接push了

from androidwheelview.

mr235 avatar mr235 commented on September 26, 2024

@mlxy 谢谢啦,还玩不好github

from androidwheelview.

dotfeng avatar dotfeng commented on September 26, 2024

onmeasure 中添加了

switch(widthMode){
case MeasureSpec.AT_MOST:
measuredWidth = maxTextWidth + paddingLeft + paddingRight;
break;
case MeasureSpec.EXACTLY:
measuredWidth = widthSize;
if(paddingLeft == 0 || paddingRight == 0) {
paddingLeft = (measuredWidth - maxTextWidth) / 2;
paddingRight = paddingLeft;
}
break;
case MeasureSpec.UNSPECIFIED:
measuredWidth = maxTextWidth + paddingLeft + paddingRight;
break;
}

public final void setInitPosition(int initPosition) {
this.initPosition = initPosition;
totalScrollY = 0;//popup场景
}

from androidwheelview.

weidongjian avatar weidongjian commented on September 26, 2024

增加了一个设置scaleX的方法,设置为1,折没有错位效果

from androidwheelview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.