Moved log

This commit is contained in:
M66B
2018-11-13 18:26:56 +01:00
parent c0e985acfc
commit d73ae7bced
3 changed files with 10 additions and 26 deletions

View File

@@ -218,7 +218,10 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
drawerLayout.closeDrawer(drawerList);
onMenuInbox((long) item.getData());
return true;
case R.string.menu_about:
case R.string.menu_setup:
onShowLog();
return true;
case R.string.menu_faq:
onDebugInfo();
return true;
default:
@@ -779,6 +782,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
fragmentTransaction.commit();
}
private void onShowLog() {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentLogs()).addToBackStack("logs");
fragmentTransaction.commit();
}
private void onDebugInfo() {
new SimpleTask<Long>() {
@Override

View File

@@ -23,16 +23,13 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentTransaction;
public class FragmentAbout extends FragmentEx {
private TextView tvVersion;
private Button btnLog;
@Override
@Nullable
@@ -42,19 +39,9 @@ public class FragmentAbout extends FragmentEx {
View view = inflater.inflate(R.layout.fragment_about, container, false);
tvVersion = view.findViewById(R.id.tvVersion);
btnLog = view.findViewById(R.id.btnLog);
tvVersion.setText(getString(R.string.title_version, BuildConfig.VERSION_NAME));
btnLog.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentLogs()).addToBackStack("logs");
fragmentTransaction.commit();
}
});
return view;
}
}