mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Bundle追加
This commit is contained in:
parent
5df0c7ee52
commit
9865790a98
|
@ -35,6 +35,7 @@ public class ViewerMainActivity extends AppCompatActivity {
|
||||||
// Variables
|
// Variables
|
||||||
private static final String TAG = "ViewerMainActivity";
|
private static final String TAG = "ViewerMainActivity";
|
||||||
String documentId;
|
String documentId;
|
||||||
|
String documentName;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -50,6 +51,7 @@ public class ViewerMainActivity extends AppCompatActivity {
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
try {
|
try {
|
||||||
documentId = intent.getStringExtra("documentId");
|
documentId = intent.getStringExtra("documentId");
|
||||||
|
documentName = intent.getStringExtra("documentName");
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
logger.error(TAG, "Failed to get documentId from intent");
|
logger.error(TAG, "Failed to get documentId from intent");
|
||||||
|
@ -60,7 +62,7 @@ public class ViewerMainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
// Navigation
|
// Navigation
|
||||||
getSupportFragmentManager().beginTransaction()
|
getSupportFragmentManager().beginTransaction()
|
||||||
.replace(R.id.nav_host_fragment, ComponentViewerTopFragment.newInstance(documentId))
|
.replace(R.id.nav_host_fragment, ComponentViewerTopFragment.newInstance(documentId, documentName))
|
||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user