Search in sources :

Example 1 with MessageFragment

use of com.android.dialer.widget.MessageFragment in project android_packages_apps_Dialer by LineageOS.

the class PostCallActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle bundle) {
    super.onCreate(bundle);
    setContentView(R.layout.post_call_activity);
    ((DialerToolbar) findViewById(R.id.toolbar)).setTitle(R.string.post_call_message);
    useRcs = getIntent().getBooleanExtra(KEY_RCS_POST_CALL, false);
    LogUtil.i("PostCallActivity.onCreate", "useRcs: %b", useRcs);
    int postCallCharLimit = useRcs ? getResources().getInteger(R.integer.post_call_char_limit) : MessageFragment.NO_CHAR_LIMIT;
    String[] messages = new String[] { getString(R.string.post_call_message_1), getString(R.string.post_call_message_2), getString(R.string.post_call_message_3) };
    MessageFragment fragment = MessageFragment.builder().setCharLimit(postCallCharLimit).showSendIcon().setMessages(messages).build();
    getSupportFragmentManager().beginTransaction().replace(R.id.message_container, fragment).commit();
}
Also used : DialerToolbar(com.android.dialer.widget.DialerToolbar) MessageFragment(com.android.dialer.widget.MessageFragment)

Aggregations

DialerToolbar (com.android.dialer.widget.DialerToolbar)1 MessageFragment (com.android.dialer.widget.MessageFragment)1