Search in sources :

Example 6 with FragmentChat

use of net.iGap.fragments.FragmentChat in project iGap-Android by KianIranian-STDG.

the class GoToChatActivity method loadChatFragment.

private void loadChatFragment(FragmentActivity activity) {
    FragmentChat fragmentChat = new FragmentChat();
    fragmentChat.setArguments(getBundle());
    fragmentChatBackStack(activity);
    if (G.twoPaneMode) {
        if (activity instanceof ActivityMain) {
            ((ActivityMain) activity).goToChatPage(fragmentChat);
        } else {
            Log.wtf(this.getClass().getName(), "loadChatFragment");
        }
    } else {
        new HelperFragment(activity.getSupportFragmentManager(), fragmentChat).setReplace(false).load();
    }
}
Also used : ActivityMain(net.iGap.activities.ActivityMain) FragmentChat(net.iGap.fragments.FragmentChat)

Example 7 with FragmentChat

use of net.iGap.fragments.FragmentChat in project iGap-Android by KianIranian-STDG.

the class ActivityMain method goToTabletEmptyPage.

public void goToTabletEmptyPage() {
    Log.wtf(this.getClass().getName(), "goToTabletEmptyPage");
    Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.mainFrame);
    if (fragment instanceof FragmentChat) {
        getSupportFragmentManager().beginTransaction().remove(fragment).commit();
    }
}
Also used : FragmentChat(net.iGap.fragments.FragmentChat) PaymentFragment(net.iGap.fragments.PaymentFragment) Fragment(androidx.fragment.app.Fragment) HelperFragment(net.iGap.helper.HelperFragment) OpenFragment(net.iGap.observers.interfaces.OpenFragment) TabletEmptyChatFragment(net.iGap.fragments.TabletEmptyChatFragment) BaseFragment(net.iGap.fragments.BaseFragment) CameraStoryFragment(net.iGap.story.CameraStoryFragment) CallSelectFragment(net.iGap.fragments.CallSelectFragment) SearchFragment(net.iGap.fragments.SearchFragment) DiscoveryFragment(net.iGap.fragments.discovery.DiscoveryFragment) BottomNavigationFragment(net.iGap.fragments.BottomNavigationFragment)

Example 8 with FragmentChat

use of net.iGap.fragments.FragmentChat in project iGap-Android by KianIranian-STDG.

the class ActivityMain method goToChatPage.

public void goToChatPage(FragmentChat fragmentChat) {
    Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.mainFrame);
    if (fragment instanceof FragmentChat) {
        getSupportFragmentManager().beginTransaction().remove(fragment).commit();
    }
    getSupportFragmentManager().beginTransaction().add(R.id.mainFrame, fragmentChat).commit();
/*new HelperFragment(getSupportFragmentManager(), fragmentChat).setReplace(false).load();*/
}
Also used : FragmentChat(net.iGap.fragments.FragmentChat) PaymentFragment(net.iGap.fragments.PaymentFragment) Fragment(androidx.fragment.app.Fragment) HelperFragment(net.iGap.helper.HelperFragment) OpenFragment(net.iGap.observers.interfaces.OpenFragment) TabletEmptyChatFragment(net.iGap.fragments.TabletEmptyChatFragment) BaseFragment(net.iGap.fragments.BaseFragment) CameraStoryFragment(net.iGap.story.CameraStoryFragment) CallSelectFragment(net.iGap.fragments.CallSelectFragment) SearchFragment(net.iGap.fragments.SearchFragment) DiscoveryFragment(net.iGap.fragments.discovery.DiscoveryFragment) BottomNavigationFragment(net.iGap.fragments.BottomNavigationFragment)

Aggregations

FragmentChat (net.iGap.fragments.FragmentChat)8 Fragment (androidx.fragment.app.Fragment)7 BottomNavigationFragment (net.iGap.fragments.BottomNavigationFragment)6 PaymentFragment (net.iGap.fragments.PaymentFragment)6 TabletEmptyChatFragment (net.iGap.fragments.TabletEmptyChatFragment)6 BaseFragment (net.iGap.fragments.BaseFragment)5 CallSelectFragment (net.iGap.fragments.CallSelectFragment)5 SearchFragment (net.iGap.fragments.SearchFragment)5 DiscoveryFragment (net.iGap.fragments.discovery.DiscoveryFragment)5 HelperFragment (net.iGap.helper.HelperFragment)5 OpenFragment (net.iGap.observers.interfaces.OpenFragment)5 CameraStoryFragment (net.iGap.story.CameraStoryFragment)5 ActivityMain (net.iGap.activities.ActivityMain)2 SuppressLint (android.annotation.SuppressLint)1 Bundle (android.os.Bundle)1 Log (android.util.Log)1 NonNull (androidx.annotation.NonNull)1 FragmentActivity (androidx.fragment.app.FragmentActivity)1 Lifecycle (androidx.lifecycle.Lifecycle)1 DialogAction (com.afollestad.materialdialogs.DialogAction)1