Hirdetés
Új hozzászólás Aktív témák
-
negyedes
addikt
válasz
WonderCSabo
#893
üzenetére
hat nem, tudom mit masoljak be.

ez a main:
public class MainActivity extends FragmentActivity implements
PatientFrag.OnPatientSelect {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppFolders foldercheck = new AppFolders();
foldercheck.updateExternalStorageState();
foldercheck.updateFolders();
DatabaseHandler db = new DatabaseHandler(this);
db.addPatient(new Patient("Noname1", "10.12.1978", "35", "/sdcard/dicomview/patient/0.dcm" ));
Log.d("Insert: ", "Inserting ..");
setContentView(R.layout.activity_main);
setContentView(R.layout.patient_layout);
// testing if the load is for the first time or a resume
if (findViewById(R.id.patient_list) != null) {
if (savedInstanceState != null) {
return;
}
}
// creating a first instance(pationt)
PatientFrag patientFrag = new PatientFrag();
patientFrag.setArguments(getIntent().getExtras());
// puts the patient_list fragment to the fragmentlayout
getSupportFragmentManager().beginTransaction()
.add(R.id.patient_list, patientFrag).commit();
}
public void patientSelect(int patientPos) {
// find the image fragment
ImageFrag imageFrag = (ImageFrag) getSupportFragmentManager()
.findFragmentById(R.id.image_view);
// verify iff image is opened
if (imageFrag != null) {
// if it is update it
imageFrag.updateImage(patientPos);
} else {
ImageFrag newFrag = new ImageFrag();
Bundle args = new Bundle();
args.putInt(ImageFrag.ARG_POSITION, patientPos);
newFrag.setArguments(args);
FragmentTransaction transaction = getSupportFragmentManager()
.beginTransaction();
transaction.replace(R.id.patient_list, newFrag);
transaction.addToBackStack(null);
transaction.commit();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
Új hozzászólás Aktív témák
- Inno3D GeForce RTX 4070 Ti X3 12G - Karácsonyi akcióban!
- Redragon Kumara K552 RGB Brown Switch magyar billentyűzet
- Lenovo Thinkpad P1 Gen 6 - i9-13980HX, 32GB, 2TB SSD, 16" WQUXGA (3840 2400), RTX 4090
- 15.gen! Intel Core Ultra 9 285K +16-32GB DDR5 RAM +hűtött VRM-es Z890 lap! GAR/SZÁMLA (a Te nevedre)
- OP AudioCodes C450HD Ip Phones - Szines kijelzős - Teams/ Zoom telefon - Új dobozos
- Acer Predator Helios 18 AI I9 ULTRA 9275HX, 192GB RAM, 2TB SSD, RTX 5080
- REFURBISHED - DELL Universal Dock D6000 (452-BCYH) (DisplayLink)
- magyar billentyűzet - 173 - Lenovo Legion Pro 7 (16IAX10H) - Intel Core U9 275HX, RTX 5080
- LG 83B4 - 83" OLED - 4K 120Hz 1ms - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1 - PS5 és Xbox Ready
- Referencia Weboldallal Világítós bill+laptop bill magyarítás. Rania 3M -is! Touchpadok is.Posta ok
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest



