Skip to content

Commit 82de919

Browse files
committed
Another auto-format run
Change-Id: I9dddce3e997a1b8c60a5e58b08fa37b51777d886
1 parent d244827 commit 82de919

File tree

28 files changed

+173
-123
lines changed

28 files changed

+173
-123
lines changed

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/AppNavigationTest.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,19 +186,19 @@ class AppNavigationTest {
186186

187187
// Confirm that if we click "<-" once, we end up back at the task details page
188188
onView(
189-
withContentDescription(
190-
activityScenario
191-
.getToolbarNavigationContentDescription()
192-
)
189+
withContentDescription(
190+
activityScenario
191+
.getToolbarNavigationContentDescription()
192+
)
193193
).perform(click())
194194
onView(withId(R.id.task_detail_title)).check(matches(isDisplayed()))
195195

196196
// Confirm that if we click "<-" a second time, we end up back at the home screen
197197
onView(
198-
withContentDescription(
199-
activityScenario
200-
.getToolbarNavigationContentDescription()
201-
)
198+
withContentDescription(
199+
activityScenario
200+
.getToolbarNavigationContentDescription()
201+
)
202202
).perform(click())
203203
onView(withId(R.id.tasksContainer)).check(matches(isDisplayed()))
204204
}

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksActivityTest.kt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ class TasksActivityTest {
180180
onView(withId(R.id.task_detail_complete)).perform(click())
181181

182182
// Click on the navigation up button to go back to the list
183-
onView(withContentDescription(
184-
activityScenario.getToolbarNavigationContentDescription())
183+
onView(
184+
withContentDescription(
185+
activityScenario.getToolbarNavigationContentDescription()
186+
)
185187
).perform(click())
186188

187189
// Check that the task is marked as completed
@@ -205,8 +207,10 @@ class TasksActivityTest {
205207
onView(withId(R.id.task_detail_complete)).perform(click())
206208

207209
// Click on the navigation up button to go back to the list
208-
onView(withContentDescription(
209-
activityScenario.getToolbarNavigationContentDescription())
210+
onView(
211+
withContentDescription(
212+
activityScenario.getToolbarNavigationContentDescription()
213+
)
210214
).perform(click())
211215

212216
// Check that the task is marked as active
@@ -232,8 +236,10 @@ class TasksActivityTest {
232236
onView(withId(R.id.task_detail_complete)).perform(click())
233237

234238
// Click on the navigation up button to go back to the list
235-
onView(withContentDescription(
236-
activityScenario.getToolbarNavigationContentDescription())
239+
onView(
240+
withContentDescription(
241+
activityScenario.getToolbarNavigationContentDescription()
242+
)
237243
).perform(click())
238244

239245
// Check that the task is marked as active
@@ -259,8 +265,10 @@ class TasksActivityTest {
259265
onView(withId(R.id.task_detail_complete)).perform(click())
260266

261267
// Click on the navigation up button to go back to the list
262-
onView(withContentDescription(
263-
activityScenario.getToolbarNavigationContentDescription())
268+
onView(
269+
withContentDescription(
270+
activityScenario.getToolbarNavigationContentDescription()
271+
)
264272
).perform(click())
265273

266274
// Check that the task is marked as active

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
-->
1717

1818
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
xmlns:tools="http://schemas.android.com/tools"
2019
package="com.example.android.architecture.blueprints.todoapp">
2120

2221
<application

app/src/main/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskFragment.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ class AddEditTaskFragment : Fragment() {
4343

4444
private val viewModel by viewModels<AddEditTaskViewModel> { getVmFactory() }
4545

46-
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
47-
savedInstanceState: Bundle?): View? {
46+
override fun onCreateView(
47+
inflater: LayoutInflater, container: ViewGroup?,
48+
savedInstanceState: Bundle?
49+
): View? {
4850
val root = inflater.inflate(R.layout.addtask_frag, container, false)
4951
viewDataBinding = AddtaskFragBinding.bind(root).apply {
5052
this.viewmodel = viewModel

app/src/main/java/com/example/android/architecture/blueprints/todoapp/statistics/StatisticsFragment.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ class StatisticsFragment : Fragment() {
3636

3737
private val statisticsViewModel by viewModels<StatisticsViewModel> { getVmFactory() }
3838

39-
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
40-
savedInstanceState: Bundle?): View? {
41-
viewDataBinding = DataBindingUtil.inflate(inflater, R.layout.statistics_frag, container,
42-
false)
39+
override fun onCreateView(
40+
inflater: LayoutInflater, container: ViewGroup?,
41+
savedInstanceState: Bundle?
42+
): View? {
43+
viewDataBinding = DataBindingUtil.inflate(
44+
inflater, R.layout.statistics_frag, container,
45+
false
46+
)
4347
return viewDataBinding.root
4448
}
4549

app/src/main/java/com/example/android/architecture/blueprints/todoapp/taskdetail/TaskDetailFragment.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ class TaskDetailFragment : Fragment() {
6161
})
6262
viewModel.editTaskCommand.observe(this, EventObserver {
6363
val action = TaskDetailFragmentDirections
64-
.actionTaskDetailFragmentToAddEditTaskFragment(args.taskId,
65-
resources.getString(R.string.edit_task))
64+
.actionTaskDetailFragmentToAddEditTaskFragment(
65+
args.taskId,
66+
resources.getString(R.string.edit_task)
67+
)
6668
findNavController().navigate(action)
6769
})
6870
}

app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class TasksAdapter(private val viewModel: TasksViewModel) :
4040
return ViewHolder.from(parent)
4141
}
4242

43-
class ViewHolder private constructor(val binding: TaskItemBinding)
44-
: RecyclerView.ViewHolder(binding.root) {
43+
class ViewHolder private constructor(val binding: TaskItemBinding) :
44+
RecyclerView.ViewHolder(binding.root) {
4545

4646
fun bind(viewModel: TasksViewModel, item: Task) {
4747

app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksFragment.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ class TasksFragment : Fragment() {
5252

5353
private lateinit var listAdapter: TasksAdapter
5454

55-
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
56-
savedInstanceState: Bundle?): View? {
55+
override fun onCreateView(
56+
inflater: LayoutInflater, container: ViewGroup?,
57+
savedInstanceState: Bundle?
58+
): View? {
5759
viewDataBinding = TasksFragBinding.inflate(inflater, container, false).apply {
5860
viewmodel = viewModel
5961
}
@@ -144,8 +146,10 @@ class TasksFragment : Fragment() {
144146

145147
private fun navigateToAddNewTask() {
146148
val action = TasksFragmentDirections
147-
.actionTasksFragmentToAddEditTaskFragment(null,
148-
resources.getString(R.string.add_task))
149+
.actionTasksFragmentToAddEditTaskFragment(
150+
null,
151+
resources.getString(R.string.add_task)
152+
)
149153
findNavController().navigate(action)
150154
}
151155

app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksViewModel.kt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,22 +95,30 @@ class TasksViewModel(
9595
// Depending on the filter type, set the filtering label, icon drawables, etc.
9696
when (requestType) {
9797
TasksFilterType.ALL_TASKS -> {
98-
setFilter(R.string.label_all, R.string.no_tasks_all,
99-
R.drawable.logo_no_fill, true)
98+
setFilter(
99+
R.string.label_all, R.string.no_tasks_all,
100+
R.drawable.logo_no_fill, true
101+
)
100102
}
101103
TasksFilterType.ACTIVE_TASKS -> {
102-
setFilter(R.string.label_active, R.string.no_tasks_active,
103-
R.drawable.ic_check_circle_96dp, false)
104+
setFilter(
105+
R.string.label_active, R.string.no_tasks_active,
106+
R.drawable.ic_check_circle_96dp, false
107+
)
104108
}
105109
TasksFilterType.COMPLETED_TASKS -> {
106-
setFilter(R.string.label_completed, R.string.no_tasks_completed,
107-
R.drawable.ic_verified_user_96dp, false)
110+
setFilter(
111+
R.string.label_completed, R.string.no_tasks_completed,
112+
R.drawable.ic_verified_user_96dp, false
113+
)
108114
}
109115
}
110116
}
111117

112-
private fun setFilter(@StringRes filteringLabelString: Int, @StringRes noTasksLabelString: Int,
113-
@DrawableRes noTaskIconDrawable: Int, tasksAddVisible: Boolean) {
118+
private fun setFilter(
119+
@StringRes filteringLabelString: Int, @StringRes noTasksLabelString: Int,
120+
@DrawableRes noTaskIconDrawable: Int, tasksAddVisible: Boolean
121+
) {
114122
_currentFilteringLabel.value = filteringLabelString
115123
_noTasksLabel.value = noTasksLabelString
116124
_noTaskIconRes.value = noTaskIconDrawable

app/src/main/res/drawable/drawer_item_color.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
-->
1717

1818
<selector xmlns:android="http://schemas.android.com/apk/res/android">
19-
<item android:color="@color/colorAccent" android:state_checked="true" />
20-
<item android:color="@color/colorGrey" android:state_checked="false" />
19+
<item android:color="@color/colorAccent" android:state_checked="true" />
20+
<item android:color="@color/colorGrey" android:state_checked="false" />
2121
</selector>

0 commit comments

Comments
 (0)