Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdd19bc3 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Add Theme.Holo.DialogWhenLarge

This theme gives you a dialog look when running on a large
or xlarge screen, otherwise a regular full-screen activity.

Also some new Fragment convenience APIs.

Change-Id: I3d97928ffaa4f3bdfd0cc5daf8823f9235c4ba68
parent a4e28d18
Loading
Loading
Loading
Loading
+63 −0
Original line number Original line Diff line number Diff line
@@ -14535,6 +14535,17 @@
 visibility="public"
 visibility="public"
>
>
</field>
</field>
<field name="Theme_Holo_DialogWhenLarge"
 type="int"
 transient="false"
 volatile="false"
 value="16973954"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="Theme_Holo_Dialog_Alert"
<field name="Theme_Holo_Dialog_Alert"
 type="int"
 type="int"
 transient="false"
 transient="false"
@@ -27381,6 +27392,17 @@
 visibility="public"
 visibility="public"
>
>
</method>
</method>
<method name="getResources"
 return="android.content.res.Resources"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getRetainInstance"
<method name="getRetainInstance"
 return="boolean"
 return="boolean"
 abstract="false"
 abstract="false"
@@ -27392,6 +27414,34 @@
 visibility="public"
 visibility="public"
>
>
</method>
</method>
<method name="getString"
 return="java.lang.String"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="resId" type="int">
</parameter>
</method>
<method name="getString"
 return="java.lang.String"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="resId" type="int">
</parameter>
<parameter name="formatArgs" type="java.lang.Object...">
</parameter>
</method>
<method name="getTag"
<method name="getTag"
 return="java.lang.String"
 return="java.lang.String"
 abstract="false"
 abstract="false"
@@ -27425,6 +27475,19 @@
 visibility="public"
 visibility="public"
>
>
</method>
</method>
<method name="getText"
 return="java.lang.CharSequence"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="resId" type="int">
</parameter>
</method>
<method name="getView"
<method name="getView"
 return="android.view.View"
 return="android.view.View"
 abstract="false"
 abstract="false"
+41 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
@@ -618,6 +619,46 @@ public class Fragment implements ComponentCallbacks, OnCreateContextMenuListener
        return mActivity;
        return mActivity;
    }
    }
    
    
    /**
     * Return <code>getActivity().getResources()</code>.
     */
    final public Resources getResources() {
        return mActivity.getResources();
    }
    
    /**
     * Return a localized, styled CharSequence from the application's package's
     * default string table.
     *
     * @param resId Resource id for the CharSequence text
     */
    public final CharSequence getText(int resId) {
        return getResources().getText(resId);
    }

    /**
     * Return a localized string from the application's package's
     * default string table.
     *
     * @param resId Resource id for the string
     */
    public final String getString(int resId) {
        return getResources().getString(resId);
    }

    /**
     * Return a localized formatted string from the application's package's
     * default string table, substituting the format arguments as defined in
     * {@link java.util.Formatter} and {@link java.lang.String#format}.
     *
     * @param resId Resource id for the format string
     * @param formatArgs The format arguments that will be used for substitution.
     */

    public final String getString(int resId, Object... formatArgs) {
        return getResources().getString(resId, formatArgs);
    }

    /**
    /**
     * Return the FragmentManager for interacting with fragments associated
     * Return the FragmentManager for interacting with fragments associated
     * with this fragment's activity.  Note that this will be non-null slightly
     * with this fragment's activity.  Note that this will be non-null slightly
+22 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2010, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License"); 
** you may not use this file except in compliance with the License. 
** You may obtain a copy of the License at 
**
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** Unless required by applicable law or agreed to in writing, software 
** distributed under the License is distributed on an "AS IS" BASIS, 
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
** See the License for the specific language governing permissions and 
** limitations under the License.
*/
-->
<resources>
    <style name="Theme.Holo.DialogWhenLarge" parent="@android:style/Theme.Holo.Dialog">
    </style>
</resources>
+8 −6
Original line number Original line Diff line number Diff line
@@ -1366,6 +1366,12 @@
  <public type="attr" name="autoAdvanceViewId" />
  <public type="attr" name="autoAdvanceViewId" />
  <public type="attr" name="useIntrinsicSizeAsMinimum" />
  <public type="attr" name="useIntrinsicSizeAsMinimum" />


  <public type="attr" name="actionModeCutDrawable" />
  <public type="attr" name="actionModeCopyDrawable" />
  <public type="attr" name="actionModePasteDrawable" />
  <public type="attr" name="textEditPasteWindowLayout" />
  <public type="attr" name="textEditNoPasteWindowLayout" />

  <public type="anim" name="animator_fade_in" />
  <public type="anim" name="animator_fade_in" />
  <public type="anim" name="animator_fade_out" />
  <public type="anim" name="animator_fade_out" />


@@ -1431,11 +1437,7 @@
  <public type="style" name="TextAppearance.Widget.PopupMenu.Small" />
  <public type="style" name="TextAppearance.Widget.PopupMenu.Small" />
  <public type="style" name="Widget.FragmentBreadCrumbs" />
  <public type="style" name="Widget.FragmentBreadCrumbs" />


  <public type="string" name="selectTextMode" />
  <public type="style" name="Theme.Holo.DialogWhenLarge" />
  
  
  <public type="attr" name="actionModeCutDrawable" />
  <public type="string" name="selectTextMode" />
  <public type="attr" name="actionModeCopyDrawable" />
  <public type="attr" name="actionModePasteDrawable" />
  <public type="attr" name="textEditPasteWindowLayout" />
  <public type="attr" name="textEditNoPasteWindowLayout" />
</resources>
</resources>
+6 −0
Original line number Original line Diff line number Diff line
@@ -1187,6 +1187,12 @@
        <item name="windowContentOverlay">@null</item>
        <item name="windowContentOverlay">@null</item>
    </style>
    </style>


    <!-- Theme for a window that will be displayed either full-screen on
         smaller screens (small, normal) or as a dialog on larger screens
         (large, xlarge) -->
    <style name="Theme.Holo.DialogWhenLarge" parent="@android:style/Theme.Holo">
    </style>
    
    <!-- Light holo dialog themes -->
    <!-- Light holo dialog themes -->


    <!-- Holo light theme for dialog windows and activities, which is used by the
    <!-- Holo light theme for dialog windows and activities, which is used by the