Skip to content

Commit

Permalink
added GutenbergEditPostActivity, first version
Browse files Browse the repository at this point in the history
  • Loading branch information
mzorz committed Dec 26, 2018
1 parent 13d3d75 commit 79eef32
Show file tree
Hide file tree
Showing 4 changed files with 3,694 additions and 2 deletions.
13 changes: 13 additions & 0 deletions WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name=".ui.posts.GutenbergEditPostActivity"
android:theme="@style/Calypso.ActionMode.Dark"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden|adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.posts.PostsListActivity" />

<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<!-- Workaround for old launcher icon pointing to .ui.posts.PostsActivity -->
<activity-alias
android:name=".ui.posts.PostsActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import org.wordpress.android.ui.posts.EditPostActivity;
import org.wordpress.android.ui.posts.EditPostPreviewFragment;
import org.wordpress.android.ui.posts.EditPostSettingsFragment;
import org.wordpress.android.ui.posts.GutenbergEditPostActivity;
import org.wordpress.android.ui.posts.HistoryListFragment;
import org.wordpress.android.ui.posts.PostListFragment;
import org.wordpress.android.ui.posts.PostPreviewActivity;
Expand Down Expand Up @@ -322,6 +323,8 @@ public interface AppComponent extends AndroidInjector<WordPress> {

void inject(EditPostActivity object);

void inject(GutenbergEditPostActivity object);

void inject(EditPostSettingsFragment object);

void inject(EditPostPreviewFragment object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ protected enum AddExistingMediaSource {
public static Intent getNormalOrGutenbergEditPostActivityIntent(Context context) {
Intent intent;
if (AppPrefs.isGutenbergEditorEnabled()) {
// TODO: return the GutenbergEditPostActivity when it's ready
intent = new Intent(context, EditPostActivity.class);
intent = new Intent(context, GutenbergEditPostActivity.class);
} else {
intent = new Intent(context, EditPostActivity.class);
}
Expand Down
Loading

0 comments on commit 79eef32

Please sign in to comment.