use of im.actor.sdk.controllers.tools.MediaPickerFragment in project actor-platform by actorapp.
the class AttachFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup fcontainer, @Nullable Bundle savedInstanceState) {
if (savedInstanceState == null) {
getChildFragmentManager().beginTransaction().add(new MediaPickerFragment(), "picker").commitNow();
}
root = new FrameLayout(getContext()) {
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (h != oldh && shareButtons != null) {
shareButtons.getLayoutParams().height = root.getHeight() - Screen.dp(135);
shareButtons.requestLayout();
}
}
};
root.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
root.setBackgroundColor(getActivity().getResources().getColor(R.color.dialog_overlay));
root.setVisibility(View.INVISIBLE);
isLoaded = false;
return root;
}
use of im.actor.sdk.controllers.tools.MediaPickerFragment in project actor-platform by actorapp.
the class GroupEditFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View res = inflater.inflate(R.layout.fragment_edit_info, container, false);
res.findViewById(R.id.rootContainer).setBackgroundColor(style.getBackyardBackgroundColor());
res.findViewById(R.id.topContainer).setBackgroundColor(style.getMainBackgroundColor());
avatarView = (AvatarView) res.findViewById(R.id.avatar);
avatarView.init(Screen.dp(52), 24);
avatarView.bind(groupVM.getAvatar().get(), groupVM.getName().get(), groupId);
avatarView.setOnClickListener(v -> {
onAvatarClicked();
});
titleEditText = (MaterialEditText) res.findViewById(R.id.name);
titleEditText.setTextColor(style.getTextPrimaryColor());
titleEditText.setBaseColor(style.getAccentColor());
titleEditText.setMetHintTextColor(style.getTextHintColor());
titleEditText.setText(groupVM.getName().get());
titleEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
avatarView.updatePlaceholder(editable.toString(), groupId);
}
});
descriptionEditText = (EditText) res.findViewById(R.id.description);
descriptionEditText.setTextColor(style.getTextPrimaryColor());
descriptionEditText.setHintTextColor(style.getTextHintColor());
descriptionEditText.setText(groupVM.getAbout().get());
// Media Picker
getChildFragmentManager().beginTransaction().add(new MediaPickerFragment(), "picker").commitNow();
return res;
}
Aggregations