Fix build -- undo manager not yet public.
Change-Id: I2d1d59e27b1bbe499421aa2312d8220d12ba18fb
This commit is contained in:
@@ -1119,6 +1119,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!--
|
||||
<activity android:name=".content.TextUndoActivity" android:label="@string/activity_text_undo">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -1126,6 +1127,7 @@
|
||||
<category android:name="android.intent.category.EMBED" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
-->
|
||||
|
||||
<activity android:name=".content.ResourcesLayoutReference"
|
||||
android:label="@string/activity_resources_layout_reference">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package com.example.android.apis.content;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.UndoManager;
|
||||
//import android.content.UndoManager;
|
||||
import android.os.Parcelable;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@@ -30,12 +30,13 @@ import android.widget.TextView;
|
||||
* Simple example of using an UndoManager for editing text in a TextView.
|
||||
*/
|
||||
public class TextUndoActivity extends Activity {
|
||||
UndoManager mUndoManager;
|
||||
//UndoManager mUndoManager;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
/*
|
||||
mUndoManager = new UndoManager();
|
||||
if (savedInstanceState != null) {
|
||||
Parcelable p = savedInstanceState.getParcelable("undo");
|
||||
@@ -43,9 +44,11 @@ public class TextUndoActivity extends Activity {
|
||||
mUndoManager.restoreInstanceState(p);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
setContentView(R.layout.text_undo);
|
||||
|
||||
/*
|
||||
((TextView)findViewById(R.id.text)).setUndoManager(mUndoManager, "text");
|
||||
((Button)findViewById(R.id.undo)).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -59,11 +62,12 @@ public class TextUndoActivity extends Activity {
|
||||
mUndoManager.redo(null, 1);
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putParcelable("undo", mUndoManager.saveInstanceState());
|
||||
//outState.putParcelable("undo", mUndoManager.saveInstanceState());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user