Search in sources :

Example 1 with EmojiService

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();
    }
}
Also used : EmojiService(de.pixart.messenger.services.EmojiService) ConversationAdapter(de.pixart.messenger.ui.adapter.ConversationAdapter)

Example 2 with EmojiService

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);
}
Also used : EmojiService(de.pixart.messenger.services.EmojiService) Intent(android.content.Intent) Location(android.location.Location)

Example 3 with EmojiService

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);
}
Also used : ListItemAdapter(de.pixart.messenger.ui.adapter.ListItemAdapter) EmojiService(de.pixart.messenger.services.EmojiService) ActionBar(android.support.v7.app.ActionBar)

Example 4 with EmojiService

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));
    }
}
Also used : EmojiService(de.pixart.messenger.services.EmojiService) Intent(android.content.Intent)

Aggregations

EmojiService (de.pixart.messenger.services.EmojiService)4 Intent (android.content.Intent)2 Location (android.location.Location)1 ActionBar (android.support.v7.app.ActionBar)1 ConversationAdapter (de.pixart.messenger.ui.adapter.ConversationAdapter)1 ListItemAdapter (de.pixart.messenger.ui.adapter.ListItemAdapter)1