mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 19:47:36 +00:00
Bundle追加
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -35,6 +35,7 @@ public class ViewerMainActivity extends AppCompatActivity {
|
||||
// Variables
|
||||
private static final String TAG = "ViewerMainActivity";
|
||||
String documentId;
|
||||
String documentName;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -50,6 +51,7 @@ public class ViewerMainActivity extends AppCompatActivity {
|
||||
Intent intent = getIntent();
|
||||
try {
|
||||
documentId = intent.getStringExtra("documentId");
|
||||
documentName = intent.getStringExtra("documentName");
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error(TAG, "Failed to get documentId from intent");
|
||||
@@ -60,7 +62,7 @@ public class ViewerMainActivity extends AppCompatActivity {
|
||||
|
||||
// Navigation
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.nav_host_fragment, ComponentViewerTopFragment.newInstance(documentId))
|
||||
.replace(R.id.nav_host_fragment, ComponentViewerTopFragment.newInstance(documentId, documentName))
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user