Skip to content

Commit

Permalink
function update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojieonly committed Oct 20, 2023
1 parent 5bbde4c commit bccf4af
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public boolean onItemClick(EasyRecyclerView parent, View view, int position, lon
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public boolean onMenuItemClick(MenuItem item) {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
16 changes: 9 additions & 7 deletions app/src/main/java/com/hippo/ehviewer/ui/scene/ToolbarScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
Expand Down Expand Up @@ -82,15 +83,16 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
mToolbar.setOnMenuItemClickListener(ToolbarScene.this::onMenuItemClick);
onMenuCreated(mToolbar.getMenu());
}
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onNavigationClick();
}
});
mToolbar.setNavigationOnClickListener(this::onNavigationClick);
mToolbar.setOnClickListener(this::onClickListener);
}
}

public void onClickListener(View view) {

}


public int getMenuResId() {
return 0;
}
Expand All @@ -102,7 +104,7 @@ public boolean onMenuItemClick(MenuItem item) {
return false;
}

public void onNavigationClick() {
public void onNavigationClick(View view) {
}

public void setNavigationIcon(@DrawableRes int resId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void onDestroyView() {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public void onDestroyView() {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void onDestroyView() {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void onDestroyView() {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private void updateView(boolean animation) {
}

@Override
public void onNavigationClick() {
public void onNavigationClick(View view) {
onBackPressed();
}

Expand Down

0 comments on commit bccf4af

Please sign in to comment.