PlaceHolderView icon indicating copy to clipboard operation
PlaceHolderView copied to clipboard

How to set the text based on the position

Open Chandrakala14 opened this issue 4 years ago • 0 comments

HI,

I need to replace the card data based on the position,

Here I am able to get the position and unable to set the data based on the position

Below is my code :

 public InfoView(Context mContext, Info info, Activity activity) {
        mContext = mContext;
        mInfo = info;
        mActivity = activity;

    }


    @View(R.id.layout)
    public static LinearLayout layout;


    @Resolve
    private void onResolved() {

        Type.setText(mInfo.getType());
//        DispName.setText(mInfo.getDisplayName());
//        Source.setText(mInfo.getSource());
//        Destin.setText(mInfo.getDestination());
        JourneyDate.setText(String.valueOf(mInfo.getJourneydate()));
        Arrival_Time.setText(mInfo.getArrivalTime());
        Depttime.setText(mInfo.getDepartureTime());
        JourneyType.setText(String.valueOf(mInfo.getJourneyType()));
//        Duration.setText(mInfo.getDuration());
        Fare.setText(String.valueOf(mInfo.getNetFares()));
        Address.setText(mInfo.getAddress());
        Ratings.setText(mInfo.getRating());


        layout.setOnClickListener(new android.view.View.OnClickListener() {
            @Override
            public void onClick(android.view.View view) {

                Log.i("dataaa ", "Onclicked");
                Log.i("dataaa ", mInfo.getType());
                Log.i("dataaa ", mChildPosition + " test " + mParentPosition);
                String id = String.valueOf(mParentPosition + "" + mChildPosition);

                Toast.makeText(mActivity, id, Toast.LENGTH_SHORT).show();

                String type = mInfo.getType();

                try {
                    Intent intent = new Intent();
                    intent.getIntExtra("c1position", 0);
                } catch (Exception e) {
                    e.printStackTrace();
                }

Please help me to solve this.

Chandrakala14 avatar Nov 11 '19 07:11 Chandrakala14