小编Rah*_*h M的帖子

如何在ActionBar中显示动作的图标和标题?

我需要同时显示icontitle行动中ActionBar.

我试过" withText"选项,但它没有效果.

在此输入图像描述

android android-ui android-layout actionbarsherlock android-actionbar

76
推荐指数
5
解决办法
11万
查看次数

jQuery Mobile无法在PhoneGap Windows Phone 8中运行

我正在使用PhoneGap和jQuery Mobile开发应用程序.

我已经完成了应用程序的android版本.我正在使用Adobe PhoneGap构建来构建我的应用程序.Android版本运行完美.但现在我正在尝试测试该应用的Windows Phone 8版本.

app.xap在Visual Studio 2012模拟器中测试了PhoneGap构建.似乎jQuery mobile不起作用.出于测试目的,我创建了一个示例应用程序.有两jQuery mobile页.那也没有用.

请帮帮我.任何有用的帮助将深表感谢.谢谢,=)请告诉我哪里出了问题.

粘贴我的示例代码:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <!--[if IE 7]><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /><![endif]-->
    <link rel="stylesheet"  href="css/index.css" />
    <link rel="stylesheet"  href="jquery.mobile/jquery.mobile-1.1.0.css" />

    <title>Hello World</title>
</head>
<body>
    <div data-role="page" id="page1">
<div data-theme="a" data-role="header">
    <h3>
        Header
    </h3>
</div>
<div data-role="content">
    <a data-role="button" href="#page2">
        Button
    </a>
</div>
<div …
Run Code Online (Sandbox Code Playgroud)

jquery-mobile cordova windows-phone-8

8
推荐指数
1
解决办法
8976
查看次数

如何使用Phonegap CLI创建/构建本地应用程序

我正在尝试开发一个Phonegap应用程序(Android/IOS).

我已经在Phonegap Build中创建了1个私有应用程序.所以现在我收到一个错误说

[phonegap] detecting Android SDK environment...
[phonegap] using the remote environment
[phonegap] compressing the app...
[phonegap] uploading the app...
[error] {"error":"Private app limit reached"}
Run Code Online (Sandbox Code Playgroud)

如何使用Phonegap CLI创建公共应用程序.

command-line-interface cordova phonegap-build

7
推荐指数
1
解决办法
1万
查看次数

如何制作Angular2 Service单例?

我正试图在我的应用程序中实现一个auth guard.即; 只有经过身份验证的用户才能访问我的应用的某些路由 我跟着这里给出的啧啧.

一旦用户登录,我将我的AuthService中的布尔值更改为true以指示该用户已登录.这需要在应用程序的整个生命周期中保留.

下面给出了源代码:

AUTH-guard.service.ts

import { Injectable }     from '@angular/core';
import  { 
  CanActivate, Router, 
  ActivatedRouteSnapshot, 
  RouterStateSnapshot
}                       from '@angular/router';
import { AuthService }  from './auth.service';

@Injectable()
export class AuthGuardService implements CanActivate {
  constructor(private authService: AuthService, private router: Router) {}
  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {        
    let url: string = state.url;
    return this.checkLogin(url);
  }

  checkLogin(url: string): boolean {
    console.log('Auth Guard Service: ' + this.authService.isLoggedIn);
    if (this.authService.isLoggedIn) { return true; }
    // Store the attempted URL for …
Run Code Online (Sandbox Code Playgroud)

singleton injectable angular2-guards angular

7
推荐指数
1
解决办法
2096
查看次数

jQuery Mobile changePage()无法在Windows Phone中运行

我正在使用Phonegap for Windows Phone 8开发一个应用程序.

我使用jQuery Mobile进行界面设计.

$.mobile.changePage()是行不通的.页面未被更改.

有没有其他方法来改变页面?是否还有其他框架来设计移动界面?

$("#btnSearch").bind('click', function() {
    showSpinner();
    $.mobile.changePage("#pageSearch");
});
Run Code Online (Sandbox Code Playgroud)

windows-phone-7 jquery-mobile cordova

6
推荐指数
1
解决办法
3140
查看次数

android - 如何添加单选按钮旁边的视图

我想在收音机组中的单选按钮旁边设置视图.我试过但我没有得到.请任何人帮助我.

源代码

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" 
android:background="#FFFFFF">    

    <RadioGroup
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:checkedButton="@+id/view_completehistroy_rb"
            android:id="@+id/timeframe_group">

           <!-- View complete history Radio Button -->
           <RadioButton
                android:text="Complete History"
                android:textSize="16sp"
                android:layout_marginLeft="5dp"
                android:id="@+id/view_completehistroy_rb"
                android:textColor="#000000"
                />

            <!-- View history using date range Radio Button -->
            <RadioButton
                android:text="From"
                android:textSize="16sp"
                android:layout_marginLeft="5dp"
                 android:textColor="#000000"
                android:id="@+id/view_daterange_history_rb"/>

        </RadioGroup>

    <RelativeLayout 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
          <!--Layout for Time selection  -->
          <LinearLayout 
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:layout_marginLeft="5dp"
              android:layout_toRightOf="@id/view_daterange_history_rb">                      

               <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="5dip"
                 android:layout_marginRight="5dip"
                 android:text="test1" 
                  android:textColor="#000000"
                 android:textSize="16sp"/>  

                <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="5dip"
                 android:layout_marginRight="5dip"
                 android:text="test2" 
                  android:textColor="#000000"
                 android:textSize="16sp"/>                  
          </LinearLayout>
    </RelativeLayout> …
Run Code Online (Sandbox Code Playgroud)

android radio-group

4
推荐指数
1
解决办法
3283
查看次数

如何在Framework7 + Vue应用程序中导航到路线?

如何在Framework7和VueJs应用程序中导航到路线.

我想显示一个slpash屏幕并在两秒后导航到下一页.代码粘贴在下面.

<template>
...
</template>

<script>
    export default {
        name: "splash",
        mounted: function() {
            this.$router.load({url: '/about/'});   // error
        },
        data: function () {
            return {
                msg : "hello"
            }
        }
    }
</script>
Run Code Online (Sandbox Code Playgroud)

注意:这是应用程序组件(Main.vue).

javascript html-framework-7 vuejs2

2
推荐指数
1
解决办法
5607
查看次数