我有一个导航栏,该导航栏根据屏幕尺寸进行包装。有菜单项和向下箭头。但是,当我减小屏幕尺寸时,菜单项和箭头之间的间隙并不相同。我如何使所有物品都一样?
源代码:https://codepen.io/nanokozmos/pen/BaaxOyP
tvCity = (AutoCompleteTextView)findViewById(R.id.tvCity);
tvCity.setThreshold(3);
ArrayAdapter<String> cityAdapter = new ArrayAdapter<String>(this,R.layout.list_item_autocomplete,menuItems);
tvCity.setadapter(cityAdapter);
tvCity.addTextChangedListener(this);
@Override
public void afterTextChanged(Editable arg0) {
}
@Override
public void beforeTextChanged(CharSequence s,int start,int count,int after) {
}
@Override
public void onTextChanged(CharSequence s,int before,int count) {
if(s.length>2) {
if (!tvCity.isPopupShowing()) {
//show dropdown unclickable "no data found" here
return;
}
}
}
编辑:我尝试了问题37406353中的每个答案,但它们不适用于该问题。