2

したがって、次のように LinearLayout を行う xml を作成できることがわかりました。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:keepScreenOn="true">
</LinearLayout>

私の質問は次のとおりです。私は jQuery Mobile アプリを実行しています。これを web.xml ファイルに入れるだけでよいと思いました。ただし、そうしようとするとエラーが発生し続けます。ここに私のweb.xmlがあります:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<!-- The definition of the Root Spring Container shared by all Servlets 
    and Filters -->
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring/root-context.xml,
        /WEB-INF/spring/appServlet/security-context.xml</param-value>
</context-param>

<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
    <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
    <servlet-name>appServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>appServlet</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>
<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

Web アプリケーションを使用しているときに Android タブレットの画面がオフにならないようにする簡単な方法はありますか? 私が言ったように、LinearLayout コードを web.xml に入れようとしただけで、大量のエラーが発生しました。ありがとう。

4

1 に答える 1

3

Web アプリケーションを使用しているときに Android タブレットの画面がオフにならないようにする簡単な方法はありますか?

それは不可能。実際、任意の Web サイトがデバイスにそのような影響を与える可能性があるとしたら、非常に厄介です。

ネイティブ アプリ、または PhoneGap アプリを作成することを選択した場合は、画面をオフにするかどうかを制御することを検討できます。

于 2013-01-31T16:40:42.077 に答える