Hirdetés
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- iPhone topik
- Milyen okostelefont vegyek?
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
- Google Pixel topik
- Yettel topik
- Telekom mobilszolgáltatások
- Xiaomi 17 Ultra - jó az optikája
- Olcsó Realme mutatkozott be
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
Ú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
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- Autós topik
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- QNAP hálózati adattárolók (NAS)
- Annyira drága a DRAM, hogy bukta a legjobb konfigurációját a Mac Studio
- iPhone topik
- mefistofeles: Az elhízás nem akaratgyengeség! 2 Ahogy én csinálom.......
- Villanyszerelés
- E-roller topik
- Milyen okostelefont vegyek?
- További aktív témák...
- HP EliteBook 840 G7 i5-10210U 16GB 256GB FHD 400nit 1 év garancia
- ÁRGARANCIA! Épített KomPhone i5 12400F 16/32/64GB RAM RX 9060 XT 16GB GAMER PC termékbeszámítással
- Sony PS3/PS4/PS5 és kézikonzolok Okosítása és Szoftveres szintű javítása - MÁR 13.00-S PS4 IS!
- Apple iPhone 13 128GB, Kártyafüggetlen, 1 Év Garanciával
- Nvidia Quadro P2000 5GB
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


