/** get last id of topline */
private int mToplineLastId;
+ private int mTotalLastId;
/** List of candidates */
private ArrayList<WnnWord> mWnnWordArray;
/** {@code true} if the full screen mode is selected */
private boolean mIsFullView = false;
+ private boolean mIsCreateFullView = false;
+
/** The event object for "touch" */
private MotionEvent mMotionEvent = null;
boolean readMore = setViewLayout(type);
if (readMore) {
- displayCandidates(this.mConverter, false, -1);
+ if (false == mIsCreateFullView) {
+ displayCandidates(this.mConverter, false, -1);
+ mIsCreateFullView = true;
+ }
+ else{
+ visibleFullCandidate();
+ }
} else {
if (type == CandidatesViewManager.VIEW_TYPE_NORMAL) {
- //clearNormalCandidates();
mIsFullView = false;
if (mDisplayEndOffset > 0) {
int maxLine = getMaxLine();
return false;
case CandidatesViewManager.VIEW_TYPE_NORMAL:
+ clearNormalCandidates();
mViewBodyScroll.scrollTo(0, 0);
mViewCandidateList2nd.setVisibility(View.VISIBLE);
mViewCandidateBase.setMinimumHeight(-1);
mFullViewPrevLineTopId = 0;
mCreateCandidateDone = false;
mNormalViewWordCountOfLine = 0;
+ mIsCreateFullView = false;
clearCandidates();
mConverter = converter;
- //converter.resetCandidate();
setViewLayout(CandidatesViewManager.VIEW_TYPE_NORMAL);
checkImageSpan(textView, word);
mWnnWordArray.add(mWordCount, word);
mWordCount++;
+ mTotalLastId = textId;
if (FULL_VIEW_DIV < (mFullViewOccupyCount + occupyCount)) {
if (FULL_VIEW_DIV != mFullViewOccupyCount) {
mLineCount = 1;
mWordCount = 0;
mToplineLastId = 0;
+ mTotalLastId = 0;
mWnnWordArray.clear();
mLineLength = 0;
}
/** clear normalCandidate */
private void clearNormalCandidates() {
- if (false == mIsFullView) {
+ if (false == mIsCreateFullView) {
return;
}
RelativeLayout layout = mViewCandidateList2nd;
int size = layout.getChildCount();
- for (int i = mToplineLastId + 1; i < size; i++) {
+ for (int i = mToplineLastId; i < size; i++) {
View v = layout.getChildAt(i);
v.setVisibility(View.GONE);
}
- if (size > mToplineLastId) {
+ if (mTotalLastId > mToplineLastId) {
mCanReadMore = true;
- mLineCount = getMaxLine() + 1;
+ }
+ }
+ /** view fullCandidate */
+ private void visibleFullCandidate() {
+ if (false == mIsCreateFullView) {
+ return;
+ }
+ RelativeLayout layout = mViewCandidateList2nd;
+ int size = layout.getChildCount();
+ if (size > mTotalLastId) {
+ size = mTotalLastId;
+ }
+ for (int i = 0; i < size; i++) {
+ View v = layout.getChildAt(i);
+ v.setVisibility(View.VISIBLE);
+ }
+ if (mTotalLastId != 0) {
+ mCanReadMore = false;
}
}
/** clear FullCandidate */