use of com.lingtuan.firefly.contact.adapter.SelectGroupMemberListAdapter in project SmartMesh_Android by SmartMeshFoundation.
the class SelectGroupMemberListUI method initData.
@Override
protected void initData() {
setTitle(R.string.group_member_select_list);
String response = Utils.readFromFile("conversation-get_conversation" + NextApplication.myInfo.getLocalId() + ".json");
mAdapter = new SelectGroupMemberListAdapter(null, this);
mSearchAdapter = new SelectGroupMemberListAdapter(null, this);
if (!TextUtils.isEmpty(response)) {
try {
JSONObject json = new JSONObject(response);
parserJson(json);
} catch (JSONException e) {
e.printStackTrace();
}
}
mInTextView.setHint(R.string.search);
mListView.setAdapter(mAdapter);
loadData();
}
use of com.lingtuan.firefly.contact.adapter.SelectGroupMemberListAdapter in project SmartMesh_Android by SmartMeshFoundation.
the class SelectGroupMemberListUI method showSearch.
private void showSearch() {
isSearch = true;
final int initialHeight = mTitleRela.getHeight();
Animation anim = new Animation() {
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
if (interpolatedTime == 1) {
} else {
RelativeLayout.LayoutParams lp = (LayoutParams) mTitleRela.getLayoutParams();
lp.setMargins(0, -(int) (initialHeight * interpolatedTime), 0, 0);
mTitleRela.requestLayout();
}
}
@Override
public boolean willChangeBounds() {
return true;
}
};
anim.setDuration(300);
anim.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
RelativeLayout.LayoutParams lp = (LayoutParams) mTitleRela.getLayoutParams();
lp.setMargins(0, -initialHeight, 0, 0);
mTitleRela.requestLayout();
searchResultLayout.setVisibility(View.VISIBLE);
mTitleRela.setVisibility(View.GONE);
mInputSearchLayout.setVisibility(View.VISIBLE);
mInTextView.setVisibility(View.INVISIBLE);
mInputSearch.setFocusable(true);
mInputSearch.setFocusableInTouchMode(true);
mInputSearch.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mInputSearch, InputMethodManager.SHOW_FORCED);
}
});
mTitleRela.startAnimation(anim);
mSearchAdapter = new SelectGroupMemberListAdapter(friendFilterList, this);
mSearchListView.setAdapter(mSearchAdapter);
}
Aggregations