* commit '66adf0d04d92257e60a583617fb97f136fefd192': docs: resolve bugs from external tracker
This commit is contained in:
@ -239,7 +239,7 @@ public class AppWidgetManager {
|
|||||||
public static final String EXTRA_CUSTOM_SORT = "customSort";
|
public static final String EXTRA_CUSTOM_SORT = "customSort";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A sentiel value that the AppWidget manager will never return as a appWidgetId.
|
* A sentinel value that the AppWidget manager will never return as a appWidgetId.
|
||||||
*/
|
*/
|
||||||
public static final int INVALID_APPWIDGET_ID = 0;
|
public static final int INVALID_APPWIDGET_ID = 0;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ import java.util.HashMap;
|
|||||||
*
|
*
|
||||||
* <p>Each FileObserver instance monitors a single file or directory.
|
* <p>Each FileObserver instance monitors a single file or directory.
|
||||||
* If a directory is monitored, events will be triggered for all files and
|
* If a directory is monitored, events will be triggered for all files and
|
||||||
* subdirectories (recursively) inside the monitored directory.</p>
|
* subdirectories inside the monitored directory.</p>
|
||||||
*
|
*
|
||||||
* <p>An event mask is used to specify which changes or actions to report.
|
* <p>An event mask is used to specify which changes or actions to report.
|
||||||
* Event type constants are used to describe the possible changes in the
|
* Event type constants are used to describe the possible changes in the
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
Provides tools for browsing the web.
|
<p>Provides tools for browsing the web.
|
||||||
<p>The only classes or interfaces in this package intended for use by SDK
|
<p>For more information about building apps with web-based content, see the
|
||||||
developers are WebView, BroswerCallbackAdapter, BrowserCallback, and CookieManager.
|
<a href="{@docRoot}guide/webapps/overview.html">Web Apps Overview</a>.
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -122,6 +122,7 @@ public void onCreate(Bundle savedInstanceState) {
|
|||||||
<pre>
|
<pre>
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
if (mServiceConn != null) {
|
if (mServiceConn != null) {
|
||||||
unbindService(mServiceConn);
|
unbindService(mServiceConn);
|
||||||
}
|
}
|
||||||
|
@ -237,16 +237,16 @@ page.title=Wi-Fi Direct
|
|||||||
*/
|
*/
|
||||||
public class WiFiDirectBroadcastReceiver extends BroadcastReceiver {
|
public class WiFiDirectBroadcastReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
private WifiP2pManager manager;
|
private WifiP2pManager mManager;
|
||||||
private Channel channel;
|
private Channel mChannel;
|
||||||
private MyWiFiActivity activity;
|
private MyWiFiActivity mActivity;
|
||||||
|
|
||||||
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
|
public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
|
||||||
MyWifiActivity activity) {
|
MyWifiActivity activity) {
|
||||||
super();
|
super();
|
||||||
this.manager = manager;
|
this.mManager = manager;
|
||||||
this.channel = channel;
|
this.mChannel = channel;
|
||||||
this.activity = activity;
|
this.mActivity = activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -333,7 +333,7 @@ protected void onCreate(Bundle savedInstanceState){
|
|||||||
...
|
...
|
||||||
mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
|
mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
|
||||||
mChannel = mManager.initialize(this, getMainLooper(), null);
|
mChannel = mManager.initialize(this, getMainLooper(), null);
|
||||||
mReceiver = new WiFiDirectBroadcastReceiver(manager, channel, this);
|
mReceiver = new WiFiDirectBroadcastReceiver(mManager, mChannel, this);
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
@ -397,7 +397,7 @@ protected void onPause() {
|
|||||||
that the discovery process succeeded and does not provide any information about the actual peers
|
that the discovery process succeeded and does not provide any information about the actual peers
|
||||||
that it discovered, if any:</p>
|
that it discovered, if any:</p>
|
||||||
<pre>
|
<pre>
|
||||||
manager.discoverPeers(channel, new WifiP2pManager.ActionListener() {
|
mManager.discoverPeers(channel, new WifiP2pManager.ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
...
|
...
|
||||||
@ -425,8 +425,8 @@ if (WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION.equals(action)) {
|
|||||||
// request available peers from the wifi p2p manager. This is an
|
// request available peers from the wifi p2p manager. This is an
|
||||||
// asynchronous call and the calling activity is notified with a
|
// asynchronous call and the calling activity is notified with a
|
||||||
// callback on PeerListListener.onPeersAvailable()
|
// callback on PeerListListener.onPeersAvailable()
|
||||||
if (manager != null) {
|
if (mManager != null) {
|
||||||
manager.requestPeers(channel, myPeerListListener);
|
mManager.requestPeers(mChannel, myPeerListListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
@ -453,7 +453,7 @@ if (WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION.equals(action)) {
|
|||||||
WifiP2pDevice device;
|
WifiP2pDevice device;
|
||||||
WifiP2pConfig config = new WifiP2pConfig();
|
WifiP2pConfig config = new WifiP2pConfig();
|
||||||
config.deviceAddress = device.deviceAddress;
|
config.deviceAddress = device.deviceAddress;
|
||||||
manager.connect(channel, config, new ActionListener() {
|
mManager.connect(mChannel, config, new ActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
@ -115,6 +115,7 @@ other mention of the element name.
|
|||||||
<a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a>
|
<a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a>
|
||||||
<a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html"><grant-uri-permission /></a>
|
<a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html"><grant-uri-permission /></a>
|
||||||
<a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data /></a>
|
<a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data /></a>
|
||||||
|
<a href="{@docRoot}guide/topics/manifest/path-permission-element.html"><path-permission /></a>
|
||||||
<a href="{@docRoot}guide/topics/manifest/provider-element.html"></provider></a>
|
<a href="{@docRoot}guide/topics/manifest/provider-element.html"></provider></a>
|
||||||
|
|
||||||
<a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><uses-library /></a>
|
<a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><uses-library /></a>
|
||||||
|
@ -170,7 +170,7 @@ image is resized and cropped to fit in these dimensions, as appropriate.</li>
|
|||||||
be cropped toward the center (if necessary).</li>
|
be cropped toward the center (if necessary).</li>
|
||||||
<li>{@link android.widget.ImageView#setPadding(int,int,int,int)} defines the padding for all
|
<li>{@link android.widget.ImageView#setPadding(int,int,int,int)} defines the padding for all
|
||||||
sides. (Note that, if the images have different aspect-ratios, then less
|
sides. (Note that, if the images have different aspect-ratios, then less
|
||||||
padding will cause for more cropping of the image if it does not match
|
padding will cause more cropping of the image if it does not match
|
||||||
the dimensions given to the ImageView.)</li>
|
the dimensions given to the ImageView.)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ resources so the system must shut down background processes to recover memory.</
|
|||||||
<p>When your activity is destroyed because the user presses <em>Back</em> or the activity finishes
|
<p>When your activity is destroyed because the user presses <em>Back</em> or the activity finishes
|
||||||
itself, the system's concept of that {@link android.app.Activity} instance is gone forever because
|
itself, the system's concept of that {@link android.app.Activity} instance is gone forever because
|
||||||
the behavior indicates the activity is no longer needed. However, if the system destroys
|
the behavior indicates the activity is no longer needed. However, if the system destroys
|
||||||
the activity due to system constraints (rather than normal app behavior), then althought the actual
|
the activity due to system constraints (rather than normal app behavior), then although the actual
|
||||||
{@link android.app.Activity} instance is gone, the system remembers that it existed such that if
|
{@link android.app.Activity} instance is gone, the system remembers that it existed such that if
|
||||||
the user navigates back to it, the system creates a new instance of the activity using a set of
|
the user navigates back to it, the system creates a new instance of the activity using a set of
|
||||||
saved data that describes the state of the activity when it was destroyed. The saved data that the
|
saved data that describes the state of the activity when it was destroyed. The saved data that the
|
||||||
@ -126,7 +126,7 @@ can save the state of the view hierarchy.</p>
|
|||||||
state from the {@link android.os.Bundle} that the system
|
state from the {@link android.os.Bundle} that the system
|
||||||
passes your activity. Both the {@link android.app.Activity#onCreate onCreate()} and {@link
|
passes your activity. Both the {@link android.app.Activity#onCreate onCreate()} and {@link
|
||||||
android.app.Activity#onRestoreInstanceState onRestoreInstanceState()} callback methods receive
|
android.app.Activity#onRestoreInstanceState onRestoreInstanceState()} callback methods receive
|
||||||
the same {@link android.os.Bundle} that containes the instance state information.</p>
|
the same {@link android.os.Bundle} that contains the instance state information.</p>
|
||||||
|
|
||||||
<p>Because the {@link android.app.Activity#onCreate onCreate()} method is called whether the
|
<p>Because the {@link android.app.Activity#onCreate onCreate()} method is called whether the
|
||||||
system is creating a new instance of your activity or recreating a previous one, you must check
|
system is creating a new instance of your activity or recreating a previous one, you must check
|
||||||
|
@ -265,7 +265,7 @@ signal that your activity instance is being completely removed from the system m
|
|||||||
with the activity and your activity should perform most cleanup during {@link
|
with the activity and your activity should perform most cleanup during {@link
|
||||||
android.app.Activity#onPause} and {@link android.app.Activity#onStop}. However, if your
|
android.app.Activity#onPause} and {@link android.app.Activity#onStop}. However, if your
|
||||||
activity includes background threads that you created during {@link
|
activity includes background threads that you created during {@link
|
||||||
android.app.Activity#onCreate onCreate()} or other other long-running resources that could
|
android.app.Activity#onCreate onCreate()} or other long-running resources that could
|
||||||
potentially leak memory if not properly closed, you should kill them during {@link
|
potentially leak memory if not properly closed, you should kill them during {@link
|
||||||
android.app.Activity#onDestroy}.</p>
|
android.app.Activity#onDestroy}.</p>
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ present. For example:</p>
|
|||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
|
SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
|
||||||
long default = getResources().getInteger(R.string.saved_high_score_default));
|
int defaultValue = getResources().getInteger(R.string.saved_high_score_default);
|
||||||
long highScore = sharedPref.getInt(getString(R.string.saved_high_score), default);
|
long highScore = sharedPref.getInt(getString(R.string.saved_high_score), defaultValue);
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
@ -551,5 +551,5 @@ private InputStream downloadUrl(String urlString) throws IOException {
|
|||||||
conn.setDoInput(true);
|
conn.setDoInput(true);
|
||||||
// Starts the query
|
// Starts the query
|
||||||
conn.connect();
|
conn.connect();
|
||||||
InputStream stream = conn.getInputStream();
|
return conn.getInputStream();
|
||||||
}</pre>
|
}</pre>
|
||||||
|
@ -108,7 +108,7 @@ MyProject/
|
|||||||
|
|
||||||
<p>By default, the <code>layout/main.xml</code> file is used for portrait orientation.</p>
|
<p>By default, the <code>layout/main.xml</code> file is used for portrait orientation.</p>
|
||||||
|
|
||||||
<p>If you want a provide a special layout for landscape, including while on large screens, then
|
<p>If you want to provide a special layout for landscape, including while on large screens, then
|
||||||
you need to use both the <code>large</code> and <code>land</code> qualifier:</p>
|
you need to use both the <code>large</code> and <code>land</code> qualifier:</p>
|
||||||
|
|
||||||
<pre class="classic no-pretty-print">
|
<pre class="classic no-pretty-print">
|
||||||
|
@ -17,12 +17,12 @@ next.link=create-view.html
|
|||||||
|
|
||||||
<h2>You should also read</h2>
|
<h2>You should also read</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{@docRoot}/guide/topics/ui/custom-components.html">Custom Components</a>
|
<li><a href="{@docRoot}guide/topics/ui/custom-components.html">Custom Components</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{@docRoot}/guide/topics/ui/ui-events.html">Input Events</a></li>
|
<li><a href="{@docRoot}guide/topics/ui/ui-events.html">Input Events</a></li>
|
||||||
<li><a href="{@docRoot}/guide/topics/graphics/prop-animation.html">Property
|
<li><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property
|
||||||
Animation</a></li>
|
Animation</a></li>
|
||||||
<li><a href="{@docRoot}/guide/topics/graphics/hardware-accel.html">Hardware
|
<li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware
|
||||||
Acceleration</a></li>
|
Acceleration</a></li>
|
||||||
<li><a href="{@docRoot}guide/topics/ui/accessibility/index.html">
|
<li><a href="{@docRoot}guide/topics/ui/accessibility/index.html">
|
||||||
Accessibility</a> developer guide</li>
|
Accessibility</a> developer guide</li>
|
||||||
|
@ -153,4 +153,4 @@ important when your application isn’t visible and therefore can’t be control
|
|||||||
UI.</p>
|
UI.</p>
|
||||||
|
|
||||||
<p>A better approach is to register and unregister the media button event receiver when your
|
<p>A better approach is to register and unregister the media button event receiver when your
|
||||||
application gains and losses the audio focus. This is covered in detail in the next lesson.</p>
|
application gains and loses the audio focus. This is covered in detail in the next lesson.</p>
|
||||||
|
@ -90,8 +90,8 @@ cell represents an APK.</p>
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="blueCell">ETC1</td>
|
<td class="blueCell">ETC1</td>
|
||||||
<td class="greenCell">ATI</td>
|
<td class="redCell">ATI</td>
|
||||||
<td class="redCell">PowerVR</td>
|
<td class="greenCell">PowerVR</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -32,7 +32,7 @@ Intent Filters</a></li>
|
|||||||
<p>When you construct an intent, you must specify the action you want the intent to "trigger."
|
<p>When you construct an intent, you must specify the action you want the intent to "trigger."
|
||||||
Android defines several actions, including {@link android.content.Intent#ACTION_SEND} which, as
|
Android defines several actions, including {@link android.content.Intent#ACTION_SEND} which, as
|
||||||
you can probably guess, indicates that the intent is sending data from one activity to another,
|
you can probably guess, indicates that the intent is sending data from one activity to another,
|
||||||
even across process boundaries. To send data to another activity, all you need to do is speicify
|
even across process boundaries. To send data to another activity, all you need to do is specify
|
||||||
the data and its type, the system will identify compatible receiving activities and display them
|
the data and its type, the system will identify compatible receiving activities and display them
|
||||||
to the user (if there are multiple options) or immediately start the activity (if there is only
|
to the user (if there are multiple options) or immediately start the activity (if there is only
|
||||||
one option). Similarly, you can advertise the data types that your activities support receiving
|
one option). Similarly, you can advertise the data types that your activities support receiving
|
||||||
|
Reference in New Issue
Block a user