Android Open Source - hitch-hiker Adapter Feedback Item






From Project

Back to project page hitch-hiker.

License

The source code is released under:

MIT License

If you think the Android project hitch-hiker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package autostoppista.android.adapters;  
/*ww  w. j av  a2s.c  o m*/
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RatingBar;
import android.widget.TextView;
import autostoppista.core.restcall.FeedbackReturn;
import autostoppista.app.R;

public class AdapterFeedbackItem extends ObservableCollection<FeedbackReturn> {
  private TextView nickname,comment;
  private RatingBar rating;
  
  public AdapterFeedbackItem(Context context, int textViewResourceId) {
    super(context, textViewResourceId);
  }
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        convertView = inflater.inflate(R.layout.feedback_list_item, null);
        nickname = (TextView) convertView.findViewById(R.id.feedback_item_userName);
        comment = (TextView) convertView.findViewById(R.id.feedback_item_comment1);
        rating = (RatingBar) convertView.findViewById(R.id.feedback_item_rating1);
        FeedbackReturn u = getList().get(position);
        if (u!=null){
          nickname.setText(u.Writer + " (" + u.Date +")");
          comment.setText(u.Comment);
          rating.setRating(u.Mark);
        }
        return convertView;
  }
}




Java Source Code List

autostoppista.android.adapters.AdapterFeedbackItem.java
autostoppista.android.adapters.AdapterUserItem.java
autostoppista.android.adapters.ObservableCollection.java
autostoppista.android.fragments.ExtendedFragment.java
autostoppista.android.fragments.Fragment_Login.java
autostoppista.android.fragments.Fragment_feedbackForm.java
autostoppista.android.fragments.Fragment_userDetail.java
autostoppista.android.fragments.Fragment_userMainpage.java
autostoppista.android.fragments.Fragment_userWaiting.java
autostoppista.app.MainActivity.java
autostoppista.app.ModeUse.java
autostoppista.core.gcm.GCM.java
autostoppista.core.gcm.GcmBroadcastReceiver.java
autostoppista.core.gcm.Message.java
autostoppista.core.gps.GPSManager.java
autostoppista.core.gps.Position.java
autostoppista.core.http.HTTPAsyncBasic.java
autostoppista.core.http.HTTPAsync.java
autostoppista.core.http.HTTPCalls.java
autostoppista.core.http.HTTPInputBasic.java
autostoppista.core.http.HTTPInput.java
autostoppista.core.http.HTTPOutput.java
autostoppista.core.http.HTTPStartListener.java
autostoppista.core.http.HTTPonCompleteListener.java
autostoppista.core.restcall.FeedbackReturn.java
autostoppista.core.restcall.FeedbackSummary.java
autostoppista.core.restcall.LoginSaver.java
autostoppista.core.restcall.Login.java
autostoppista.core.restcall.RestCalls.java
autostoppista.core.restcall.UserInfo.java