Ú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
- Samsung Galaxy S25 - végre van kicsi!
- Autós kamerák
- Kerékpárosok, bringások ide!
- Telekom otthoni szolgáltatások (TV, internet, telefon)
- Elbaltázott tankolás miatt csúszik a NASA Holdutazása
- RAM topik
- Samsung Galaxy S21 és S21+ - húszra akartak lapot húzni
- Gaming notebook topik
- Elektromos (hálózati és akkus) kéziszerszámok, tapasztalatok/vásárlás
- Xiaomi 15 - kicsi telefon nagy energiával
- További aktív témák...
- Bomba ár! Dell Latitude E7240 - i5-4GEN I 8GB I 128SSD I 12,5" HD I HDMI I W10 I Garancia!
- GYÖNYÖRŰ iPhone 13 128GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS4393, 100% Akkumulátor
- Azonnali készpénzes AMD Ryzen 1xxx 2xxx 3xxx 5xxx processzor felvásárlás személyesen / csomagküldés
- LG 65C5 - 55" OLED evo - 4K 144Hz - 0.1ms - NVIDIA G-Sync - FreeSync - HDMI 2.1 - A9 Gen8 CPU
- HP ProDesk 600 G5 i3-9100 8GB 256GB 1 év garancia
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs


