Created
July 22, 2020 21:25
-
-
Save mzorz/3daa84e93d816d17a1f9c1e59344cc39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingBottomSheetFragment.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingBottomSheetFragment.kt | |
index 1834c7f3ed..d5bb546013 100644 | |
--- a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingBottomSheetFragment.kt | |
+++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingBottomSheetFragment.kt | |
@@ -15,6 +15,7 @@ import androidx.lifecycle.ViewModelProviders | |
import com.google.android.material.bottomsheet.BottomSheetBehavior | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import kotlinx.android.synthetic.main.post_prepublishing_bottom_sheet.* | |
+import kotlinx.android.synthetic.main.prepublishing_story_title_list_item.* | |
import org.wordpress.android.R | |
import org.wordpress.android.WordPress | |
import org.wordpress.android.fluxc.model.SiteModel | |
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeFragment.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeFragment.kt | |
index 4de86f0a3e..98d58f9225 100644 | |
--- a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeFragment.kt | |
+++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeFragment.kt | |
@@ -49,8 +49,8 @@ class PrepublishingHomeFragment : Fragment() { | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
- actions_recycler_view.layoutManager = LinearLayoutManager(requireActivity()) | |
- actions_recycler_view.adapter = PrepublishingHomeAdapter(requireActivity()) | |
+// actions_recycler_view.layoutManager = LinearLayoutManager(requireActivity()) | |
+// actions_recycler_view.adapter = PrepublishingHomeAdapter(requireActivity()) | |
initViewModel() | |
} | |
@@ -60,7 +60,7 @@ class PrepublishingHomeFragment : Fragment() { | |
.get(PrepublishingHomeViewModel::class.java) | |
viewModel.uiState.observe(viewLifecycleOwner, Observer { uiState -> | |
- (actions_recycler_view.adapter as PrepublishingHomeAdapter).update(uiState) | |
+// (actions_recycler_view.adapter as PrepublishingHomeAdapter).update(uiState) | |
}) | |
viewModel.onActionClicked.observe(viewLifecycleOwner, Observer { event -> | |
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeViewHolder.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeViewHolder.kt | |
index 35cf730245..2a82024c07 100644 | |
--- a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeViewHolder.kt | |
+++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingHomeViewHolder.kt | |
@@ -83,18 +83,22 @@ sealed class PrepublishingHomeViewHolder( | |
storyTitle.setSelection(title.text.length) | |
} | |
- val focusStoryTitleEditTextAndShowKeyboard = { | |
- storyTitle.focusAndShowKeyboard() | |
- storyTitle.postDelayed({ storyTitle.requestFocus() }, STORY_TITLE_EDIT_TEXT_REQUEST_FOCUS_DELAY) | |
- } | |
- | |
- storyTitleLayout.setOnClickListener { | |
- focusStoryTitleEditTextAndShowKeyboard() | |
- } | |
- | |
- storyTitle.postDelayed({ | |
- focusStoryTitleEditTextAndShowKeyboard() | |
- }, STORY_TITLE_EDIT_TEXT_REQUEST_FOCUS_DELAY) | |
+// val focusStoryTitleEditTextAndShowKeyboard = { | |
+// storyTitle.focusAndShowKeyboard() | |
+// storyTitle.postDelayed({ storyTitle.requestFocus() }, STORY_TITLE_EDIT_TEXT_REQUEST_FOCUS_DELAY) | |
+// } | |
+ | |
+// storyTitleLayout.setOnClickListener { | |
+//// focusStoryTitleEditTextAndShowKeyboard() | |
+// storyTitle.focusAndShowKeyboard() | |
+// } | |
+ | |
+// storyTitle.postDelayed({ | |
+// // focusStoryTitleEditTextAndShowKeyboard() | |
+// storyTitle.focusAndShowKeyboard() | |
+// }, STORY_TITLE_EDIT_TEXT_REQUEST_FOCUS_DELAY) | |
+ | |
+// storyTitle.focusAndShowKeyboard() | |
storyTitle.addTextChangedListener(object : TextWatcher { | |
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} | |
diff --git a/WordPress/src/main/res/layout/post_prepublishing_home_fragment.xml b/WordPress/src/main/res/layout/post_prepublishing_home_fragment.xml | |
index 9f5898fe1a..5143ff83e6 100644 | |
--- a/WordPress/src/main/res/layout/post_prepublishing_home_fragment.xml | |
+++ b/WordPress/src/main/res/layout/post_prepublishing_home_fragment.xml | |
@@ -4,15 +4,35 @@ | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
- <androidx.recyclerview.widget.RecyclerView | |
- android:id="@+id/actions_recycler_view" | |
+<!-- <androidx.recyclerview.widget.RecyclerView--> | |
+<!-- android:id="@+id/actions_recycler_view"--> | |
+<!-- android:layout_width="0dp"--> | |
+<!-- android:layout_height="wrap_content"--> | |
+<!-- android:clipToPadding="true"--> | |
+<!-- android:descendantFocusability="beforeDescendants"--> | |
+<!-- android:scrollbars="vertical"--> | |
+<!-- app:layout_constraintBottom_toBottomOf="parent"--> | |
+<!-- app:layout_constraintEnd_toEndOf="parent"--> | |
+<!-- app:layout_constraintStart_toStartOf="parent"--> | |
+<!-- app:layout_constraintTop_toTopOf="parent" />--> | |
+ | |
+ <EditText | |
+ android:id="@+id/story_title" | |
android:layout_width="0dp" | |
android:layout_height="wrap_content" | |
- android:clipToPadding="true" | |
- android:descendantFocusability="beforeDescendants" | |
- android:scrollbars="vertical" | |
+ android:layout_marginEnd="@dimen/margin_extra_large" | |
+ android:background="@android:color/transparent" | |
+ android:ellipsize="end" | |
+ android:fontFamily="serif" | |
+ android:hint="@string/prepublishing_nudges_story_title_hint" | |
+ android:inputType="textMultiLine" | |
+ android:maxLines="3" | |
+ android:textAlignment="viewStart" | |
+ android:textAppearance="?attr/textAppearanceHeadline5" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
+ | |
</androidx.constraintlayout.widget.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment