3
我正在custome鍵盤上。我已經setCandidatesViewShown(true)函數onCreateCandidatesView(),問題是UI無法正確重新調整。調整用戶界面與候選人可見在自定義鍵盤
任何援助將不勝感激..下面是我做了什麼
@Override
public View onCreateCandidatesView() {
LayoutInflater li = (LayoutInflater) getApplicationContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View wordBar = li.inflate(R.layout.wordbar, null);
LinearLayout ll = (LinearLayout) wordBar.findViewById(R.id.words);
Button voiceCmd = (Button) wordBar.findViewById(R.id.voiceword);
LinearLayout ll1 = null;
Button voiceCmd1 = null;
//comment this block in the event of showing only one keyboard so that we can only
//one autocorrect bar
if (isLargeScreen) {
ll1 = (LinearLayout) wordBar.findViewById(R.id.words1);
voiceCmd1 = (Button) wordBar.findViewById(R.id.voiceword1);
}
voiceCmd.setOnClickListener(voiceClickListener);
mCandidateView = new CandidateView(this);
mCandidateView.setService(this);
setCandidatesViewShown(true);
mCandidateView.setLayoutParams(new LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
ll.addView(mCandidateView);
return wordBar;
}
Thankx!它的舊的,必須重新看到你的答案是有幫助的:) – voidRy 2014-03-23 06:42:30
這是用於Portait Android應用程序,但在景觀不工作這種方法任何建議 – 2014-11-18 14:39:34