https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

| @Override | |
| public void onBindViewHolder(@NonNull RecyclerAdapter.CharacterViewHolder holder, int position) { | |
| Character character = characterList.get(position); | |
| holder.tvName.setText(character.getName()); | |
| holder.tvHouse.setText(character.getHouse()); | |
| holder.tvPatronous.setText(character.getPatronus()); | |
| holder.tvSpecies.setText(character.getBloodStatus()); | |
| holder.tvSpecies.setText(character.getSpecies()); |
| String apiKey = BuildConfig.API_KEY |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| public static float convertPixelsToDp(float px){ | |
| DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
| float dp = px / (metrics.densityDpi / 160f); | |
| return Math.round(dp); | |
| } | |
| public static float convertDpToPixel(float dp){ | |
| DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
| float px = dp * (metrics.densityDpi / 160f); | |
| return Math.round(px); |