| | package com.example.nemophila; |
---|
| | |
---|
| | import android.app.Application; |
---|
| | import android.content.SharedPreferences; |
---|
| | import android.graphics.Bitmap; |
---|
| | |
---|
| | import com.example.nemophila.entities.Account; |
---|
| | import com.example.nemophila.entities.AccountNameJson; |
---|
| | import com.example.nemophila.entities.Shop; |
---|
| |
---|
| | //アカウントのデータ |
---|
| | private String name; |
---|
| | private String uid; |
---|
| | private String token; |
---|
| | private Bitmap icon; |
---|
| | private Collection<AccountNameJson> friends; |
---|
| | |
---|
| | //ショップのデータ |
---|
| | private Shop currentShop; |
---|
| |
---|
| | token = preferences.getString("token", null); |
---|
| | } |
---|
| | return token; |
---|
| | } |
---|
| | public Bitmap getIcon() { |
---|
| | return icon; |
---|
| | } |
---|
| | public Collection<AccountNameJson> getFriends() { |
---|
| | return friends; |
---|
| | } |
---|
| | |
---|
| |
---|
| | SharedPreferences.Editor editor = preferences.edit(); |
---|
| | editor.putString("token", token); |
---|
| | this.token = token; |
---|
| | editor.commit(); |
---|
| | } |
---|
| | public void setIcon(Bitmap icon) { |
---|
| | this.icon = icon; |
---|
| | } |
---|
| | public void setFriends(Collection<AccountNameJson> friends) { |
---|
| | this.friends = friends; |
---|
| | } |
---|
| |
---|
| | |
No description provided.
nemophilaにiconを保存できるようにしました。
cd1a7e3
intomaster
fromnemophila
on 17 Oct 2023nemophila
branch on 17 Oct 2023