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