mirror of https://github.com/M66B/FairEmail.git
Moved log
This commit is contained in:
parent
c0e985acfc
commit
d73ae7bced
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,17 +46,5 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCopyright" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnLog"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/title_log"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvEula" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
Loading…
Reference in New Issue