Search in sources :

Example 6 with MainTitleMenu

use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.

the class RefreshMenu method execute.

@Override
public String execute(Context context, JSONObject request) throws Exception {
    if (!request.has("scriptTag")) {
        return "没有指定的标记参数";
    }
    if (!request.has("scriptFunction")) {
        return "没有指定要回调的函数";
    }
    if (request.has("title")) {
        String title = request.optString("title");
        String scriptFunction = request.optString("scriptFunction");
        String scriptTag = request.optString("scriptTag");
        FrmMain.getInstance().mRightMenu.add(new MainTitleMenu(title, false, scriptFunction, 1, scriptTag));
        FrmMain.getInstance().mRightMenuTemp.add(new MainTitleMenu(title, false, scriptFunction, 1, scriptTag));
    } else {
        return "没有菜单更新";
    }
    return "";
}
Also used : MainTitleMenu(cn.cerc.summer.android.core.MainTitleMenu)

Example 7 with MainTitleMenu

use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.

the class FrmMain method clearData.

/**
 * 页面发生改变时清空js上层数据
 */
public void clearData() {
    list = new ArrayList<MainTitleMenu>();
    for (int i = 0; i < allTitleList.get(classWebView).size(); i++) {
        if (2 == allTitleList.get(classWebView).get(i).getLayerSign()) {
            list.add(allTitleList.get(classWebView).get(i));
        }
    }
    allTitleList.get(classWebView).remove(list);
    for (int d = 0; d < mTitleMenu.size(); d++) {
        if (2 == mTitleMenu.get(d).getLayerSign()) {
            list.add(mTitleMenu.get(d));
        }
    }
    mTitleMenu.removeAll(list);
    list.clear();
    for (int i = 0; i < mRightMenu.size(); i++) {
        if (2 == mRightMenu.get(i).getLayerSign()) {
            list.add(mRightMenu.get(i));
        }
    }
    mRightMenu.removeAll(list);
    list.clear();
    initTitlePopWindow();
    initPopWindow();
}
Also used : MainTitleMenu(cn.cerc.summer.android.core.MainTitleMenu) SuppressLint(android.annotation.SuppressLint)

Example 8 with MainTitleMenu

use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.

the class FrmMain method CatalogWebView.

/**
 * 获得右侧上级菜单
 *
 * @param title
 * @param newUrl
 */
public void CatalogWebView(String title, String newUrl) {
    mRightMenu.add(new MainTitleMenu(title, false, newUrl, 2, ""));
    initPopWindow();
}
Also used : MainTitleMenu(cn.cerc.summer.android.core.MainTitleMenu)

Example 9 with MainTitleMenu

use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.

the class FrmMain method CatalogTitleWebView.

/**
 * 获得标题上层级菜单
 *
 * @param title
 * @param newUrl
 */
public void CatalogTitleWebView(String title, String newUrl) {
    mTitleMenu.add(new MainTitleMenu(title, false, newUrl, 2, classWebView));
    initTitlePopWindow();
}
Also used : MainTitleMenu(cn.cerc.summer.android.core.MainTitleMenu)

Aggregations

MainTitleMenu (cn.cerc.summer.android.core.MainTitleMenu)9 SuppressLint (android.annotation.SuppressLint)5 ArrayList (java.util.ArrayList)2 PendingIntent (android.app.PendingIntent)1 Intent (android.content.Intent)1 Uri (android.net.Uri)1 KeyEvent (android.view.KeyEvent)1 View (android.view.View)1 GeolocationPermissions (android.webkit.GeolocationPermissions)1 PermissionRequest (android.webkit.PermissionRequest)1 WebChromeClient (android.webkit.WebChromeClient)1 WebView (android.webkit.WebView)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 BrowserView (cn.cerc.summer.android.forms.view.BrowserView)1 DragPointView (cn.cerc.summer.android.forms.view.DragPointView)1