Skip to content

Commit

Permalink
Improve UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Alves committed Sep 18, 2020
1 parent 45d7e20 commit 12aea29
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,12 @@ public void onSequenceStep(TapTarget lastTarget, boolean targetClicked) {
mBinding.drawerLayout.openDrawer(GravityCompat.START);
} else if (lastTarget.id() == 2) {
mBinding.expandableListView.expandGroup(PlayingViewModel.ACADEMY_GROUP);
mBinding.scrollView.scrollTo(0, mBinding.expandableListView.getScrollY() + 350);
mBinding.scrollView.scrollTo(0, mBinding.expandableListView.getScrollY() + 400);
} else if (lastTarget.id() == 3) {
mBinding.expandableListView.collapseGroup(PlayingViewModel.ACADEMY_GROUP);
mBinding.expandableListView.expandGroup(PlayingViewModel.CURRENT_VILLAGE_GROUP);
mBinding.expandableListView.expandGroup(PlayingViewModel.BATTLES_GROUP);
mBinding.scrollView.scrollTo(0, mBinding.expandableListView.getScrollY() + 700);
mBinding.scrollView.scrollTo(0, mBinding.expandableListView.getScrollY() + 750);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
getContext(), new OnSwipeGestureListener() {
@Override
public void onSwipeLeft() {
goToDojoNpc();
goToDojoPvp();
}

@Override
public void onSwipeRight() {
goToDojoPvp();
goToDojoNpc();
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private void showTour() {
getString(R.string.tour_battle_battle_summary_desc))
.outerCircleAlpha(0.96f)
.dimColorInt(Color.BLACK)
.targetRadius(70)
.targetRadius(180)
.transparentTarget(true)
.cancelable(false),
TapTarget.forView(mBinding.myJutsusRecyclerView,
Expand Down
57 changes: 32 additions & 25 deletions app/src/main/res/layout/fragment_dojo_npc_battle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
Expand All @@ -62,13 +60,15 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/layout_combate_bg_topo_combate"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/battleResultLayout">

<LinearLayout
android:id="@+id/infoFightersLinearLayout"
Expand Down Expand Up @@ -305,16 +305,6 @@
android:text="@{viewModel.countDown}"
android:textColor="@android:color/white" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/battleLogRecyclerView"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginTop="8dp"
android:background="@drawable/layout_combate_bg_log"
android:paddingLeft="4dp"
android:paddingRight="4dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

</LinearLayout>

<LinearLayout
Expand Down Expand Up @@ -520,6 +510,35 @@

</LinearLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/battleLogRecyclerView"
android:layout_width="300dp"
android:layout_height="80dp"
android:layout_marginStart="36dp"
android:layout_marginLeft="36dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
android:background="@drawable/layout_combate_bg_log"
android:paddingLeft="16dp"
android:paddingRight="16dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoFightersLinearLayout" />

<TextView
android:id="@+id/movementTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/waiting_your_move"
android:textColor="@android:color/holo_orange_dark"
android:textSize="8sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/battleLogRecyclerView" />

<ImageView
android:id="@+id/barraMeusJutsusImageView"
android:layout_width="0dp"
Expand All @@ -535,18 +554,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/movementTextView" />

<TextView
android:id="@+id/movementTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/waiting_your_move"
android:textColor="@android:color/holo_orange_dark"
android:textSize="8sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoFightersLinearLayout" />

<TextView
android:id="@+id/textView42"
android:layout_width="wrap_content"
Expand Down
53 changes: 31 additions & 22 deletions app/src/main/res/layout/fragment_dojo_pvp_battle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:visibility="gone"
Expand Down Expand Up @@ -311,16 +310,6 @@
android:text="@{viewModel.countDown}"
android:textColor="@{viewModel.battle.currentPlayer == viewModel.myTurn ? @android:color/holo_red_dark : @color/colorGreen}" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/battleLogRecyclerView"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginTop="16dp"
android:background="@drawable/layout_combate_bg_log"
android:paddingLeft="4dp"
android:paddingRight="4dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

</LinearLayout>

<LinearLayout
Expand Down Expand Up @@ -526,6 +515,37 @@

</LinearLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/battleLogRecyclerView"
android:layout_width="300dp"
android:layout_height="80dp"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="36dp"
android:layout_marginRight="36dp"
android:background="@drawable/layout_combate_bg_log"
android:paddingLeft="16dp"
android:paddingRight="16dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoFightersLinearLayout">

</androidx.recyclerview.widget.RecyclerView>

<TextView
android:id="@+id/movementTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@{viewModel.battle.currentPlayer == viewModel.myTurn ? @string/waiting_your_move : @string/wait_opponent_move}"
android:textColor="#ff7d1c"
android:textSize="8sp"
app:layout_constraintEnd_toStartOf="@+id/guideline26"
app:layout_constraintStart_toStartOf="@+id/guideline55"
app:layout_constraintTop_toBottomOf="@+id/battleLogRecyclerView" />

<ImageView
android:id="@+id/jutsusBarImageView"
android:layout_width="0dp"
Expand All @@ -542,17 +562,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/movementTextView" />

<TextView
android:id="@+id/movementTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.battle.currentPlayer == viewModel.myTurn ? @string/waiting_your_move : @string/wait_opponent_move}"
android:textColor="#ff7d1c"
android:textSize="8sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoFightersLinearLayout" />

<TextView
android:id="@+id/textView42"
android:layout_width="0dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2438,5 +2438,5 @@ You will receive an email to confirm your account, then you <b>NEED TO USE A VAL
<string name="tour_home_open_the_nav_drawer_desc">Tap the menu icon to see details about your character, menu list, Naruto Game Chat &amp; more!</string>
<string name="tour_grades_desc">In the Graduations section you can see all the requirements to become a Genin, Chunin and so on!</string>
<string name="tour_get_started_now">Get Started Now</string>
<string name="tour_get_started_now_desc">You can start doing the Initial Tasks and fight Dojo NPCs be become a Genin!</string>
<string name="tour_get_started_now_desc">You can start doing the Initial Tasks and fight NPCs from the Dojo to become a Genin!</string>
</resources>

0 comments on commit 12aea29

Please sign in to comment.