Search in sources :

Example 11 with ABaseFragment

use of org.aisen.android.ui.fragment.ABaseFragment in project AisenWeiBo by wangdan.

the class BaseActivity method onHomeClick.

protected boolean onHomeClick() {
    if (mHelper != null) {
        boolean handle = mHelper.onHomeClick();
        if (handle)
            return true;
    }
    Set<String> keys = fragmentRefs.keySet();
    for (String key : keys) {
        WeakReference<ABaseFragment> fragmentRef = fragmentRefs.get(key);
        ABaseFragment fragment = fragmentRef.get();
        if (fragment != null && fragment.onHomeClick())
            return true;
    }
    return onBackClick();
}
Also used : ABaseFragment(org.aisen.android.ui.fragment.ABaseFragment)

Example 12 with ABaseFragment

use of org.aisen.android.ui.fragment.ABaseFragment in project AisenWeiBo by wangdan.

the class BaseActivity method onBackClick.

public boolean onBackClick() {
    if (mHelper != null) {
        boolean handle = mHelper.onBackClick();
        if (handle)
            return true;
    }
    Set<String> keys = fragmentRefs.keySet();
    for (String key : keys) {
        WeakReference<ABaseFragment> fragmentRef = fragmentRefs.get(key);
        ABaseFragment fragment = fragmentRef.get();
        if (fragment != null && fragment.onBackClick())
            return true;
    }
    finish();
    return true;
}
Also used : ABaseFragment(org.aisen.android.ui.fragment.ABaseFragment)

Example 13 with ABaseFragment

use of org.aisen.android.ui.fragment.ABaseFragment in project AisenWeiBo by wangdan.

the class BaseActivity method onToolbarDoubleClick.

@Override
public boolean onToolbarDoubleClick() {
    Set<String> keys = fragmentRefs.keySet();
    for (String key : keys) {
        WeakReference<ABaseFragment> fragmentRef = fragmentRefs.get(key);
        ABaseFragment fragment = fragmentRef.get();
        if (fragment != null && fragment instanceof AsToolbar.OnToolbarDoubleClick) {
            if (((AsToolbar.OnToolbarDoubleClick) fragment).onToolbarDoubleClick())
                return true;
        }
    }
    return false;
}
Also used : ABaseFragment(org.aisen.android.ui.fragment.ABaseFragment) AsToolbar(org.aisen.android.ui.widget.AsToolbar)

Aggregations

ABaseFragment (org.aisen.android.ui.fragment.ABaseFragment)13 Bundle (android.os.Bundle)4 BizFragment (org.aisen.weibo.sina.ui.fragment.base.BizFragment)2 Fragment (android.app.Fragment)1 Intent (android.content.Intent)1 Uri (android.net.Uri)1 Method (java.lang.reflect.Method)1 IAction (org.aisen.android.support.action.IAction)1 FragmentArgs (org.aisen.android.ui.activity.container.FragmentArgs)1 ATabsTabLayoutFragment (org.aisen.android.ui.fragment.ATabsTabLayoutFragment)1 AsToolbar (org.aisen.android.ui.widget.AsToolbar)1 PicUrls (org.aisen.weibo.sina.sinasdk.bean.PicUrls)1 WebLoginAction (org.aisen.weibo.sina.support.action.WebLoginAction)1 PublishBean (org.aisen.weibo.sina.support.bean.PublishBean)1 PublishType (org.aisen.weibo.sina.support.bean.PublishType)1 SdcardPermissionAction (org.aisen.weibo.sina.support.permissions.SdcardPermissionAction)1 MainActivity (org.aisen.weibo.sina.ui.activity.base.MainActivity)1 SinaCommonActivity (org.aisen.weibo.sina.ui.activity.base.SinaCommonActivity)1