use of de.pixart.messenger.services.EmojiService in project Pix-Art-Messenger by kriztan.
the class ShareWithActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
new EmojiService(this).init(useBundledEmoji);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setHomeButtonEnabled(false);
}
setContentView(R.layout.activity_share_with);
setTitle(getString(R.string.title_activity_sharewith));
mListView = findViewById(R.id.choose_conversation_list);
mAdapter = new ConversationAdapter(this, this.mConversations);
mListView.setAdapter(mAdapter);
mListView.setOnItemClickListener((arg0, arg1, position, arg3) -> share(mConversations.get(position)));
if (savedInstanceState != null) {
SharingIsRunning = savedInstanceState.getBoolean(STATE_SHARING_IS_RUNNING, false);
}
if (!SharingIsRunning) {
Log.d(Config.LOGTAG, "ShareWithActivity onCreate: state restored");
this.share = new Share();
} else {
Log.d(Config.LOGTAG, "ShareWithActivity onCreate: shring running, finish()");
this.finish();
}
}
use of de.pixart.messenger.services.EmojiService in project Pix-Art-Messenger by kriztan.
the class ShowLocationActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
new EmojiService(this).init(useBundledEmoji);
if (getSupportActionBar() != null) {
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
setContentView(R.layout.activity_show_locaction);
Intent intent = getIntent();
this.mLocationName = intent != null ? intent.getStringExtra("name") : null;
if (intent != null && intent.hasExtra("longitude") && intent.hasExtra("latitude")) {
double longitude = intent.getDoubleExtra("longitude", 0);
double latitude = intent.getDoubleExtra("latitude", 0);
this.location = new Location("");
this.location.setLatitude(latitude);
this.location.setLongitude(longitude);
}
markAndCenterOnLocation(location);
}
use of de.pixart.messenger.services.EmojiService in project Pix-Art-Messenger by kriztan.
the class StartConversationActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new EmojiService(this).init(useBundledEmoji());
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation);
this.binding.fab.setOnClickListener((v) -> {
if (getSupportActionBar().getSelectedNavigationIndex() == 0) {
showCreateContactDialog(null, null);
} else {
showCreateConferenceDialog();
}
});
ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ActionBar.Tab mContactsTab = actionBar.newTab().setText(R.string.contacts).setTabListener(mTabListener);
ActionBar.Tab mConferencesTab = actionBar.newTab().setText(R.string.conferences).setTabListener(mTabListener);
actionBar.addTab(mContactsTab);
actionBar.addTab(mConferencesTab);
binding.startConversationViewPager.setOnPageChangeListener(mOnPageChangeListener);
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
binding.startConversationViewPager.setAdapter(mListPagerAdapter);
mConferenceAdapter = new ListItemAdapter(this, conferences);
mContactsAdapter = new ListItemAdapter(this, contacts);
mContactsAdapter.setOnTagClickedListener(this.mOnTagClickedListener);
this.mHideOfflineContacts = getPreferences().getBoolean("hide_offline", false);
}
use of de.pixart.messenger.services.EmojiService in project Pix-Art-Messenger by kriztan.
the class ConversationActivity method onCreate.
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new EmojiService(this).init(useBundledEmoji());
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations);
this.getFragmentManager().addOnBackStackChangedListener(this::invalidateActionBarTitle);
this.getFragmentManager().addOnBackStackChangedListener(this::showDialogsIfMainIsOverview);
this.initializeFragments();
this.invalidateActionBarTitle();
final Intent intent;
if (savedInstanceState == null) {
intent = getIntent();
} else {
intent = savedInstanceState.getParcelable("intent");
}
if (isViewIntent(intent)) {
pendingViewIntent.push(intent);
setIntent(createLauncherIntent(this));
}
}
Aggregations