Commit efb2ae08 authored by Ishankha K.C's avatar Ishankha K.C

view baby screen and api connect

parent 1ad4e397
......@@ -3,20 +3,7 @@
<component name="deploymentTargetDropDown">
<value>
<entry key="app">
<State>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="adb-AYAV6R3925006878-kh1m4J._adb-tls-connect._tcp" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-05-21T16:09:48.003353300Z" />
</State>
<State />
</entry>
</value>
</component>
......
......@@ -18,11 +18,13 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.imageview.ShapeableImageView;
import com.kaluwa.enterprises.babycare.R;
import com.kaluwa.enterprises.babycare.activities.UserProfileActivity;
import com.kaluwa.enterprises.babycare.dialogs.EditBabyDialog;
import com.kaluwa.enterprises.babycare.dto.BabyDto;
import java.io.InputStream;
......@@ -83,6 +85,14 @@ public class BabyDashboardAdapter extends RecyclerView.Adapter<BabyDashboardAdap
Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
// Handle item click
holder.clBabyItem.setOnClickListener(v -> {
// Open the EditBabyDialog with the selected BabyDto
EditBabyDialog editBabyDialog = new EditBabyDialog(babyDto);
// Assuming context is an activity, cast it to FragmentActivity to get supportFragmentManager
editBabyDialog.show(((FragmentActivity) context).getSupportFragmentManager(), "EDIT_BABY_DIALOG");
});
}
@Override
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment