|
@@ -12,23 +12,23 @@ import de.tudarmstadt.informatik.hostage.ui2.activity.MainActivity;
|
|
* @created 14.01.14 18:04
|
|
* @created 14.01.14 18:04
|
|
*/
|
|
*/
|
|
public class Profile {
|
|
public class Profile {
|
|
- public String text;
|
|
|
|
- public String label;
|
|
|
|
- public int id;
|
|
|
|
- public boolean activated;
|
|
|
|
- public Bitmap icon;
|
|
|
|
- public String iconPath;
|
|
|
|
|
|
+ public String mText;
|
|
|
|
+ public String mLabel;
|
|
|
|
+ public int mId;
|
|
|
|
+ public boolean mActivated;
|
|
|
|
+ public Bitmap mIcon;
|
|
|
|
+ public String mIconPath;
|
|
|
|
|
|
- public boolean isBackVisible = false;
|
|
|
|
- public boolean editable = false;
|
|
|
|
|
|
+ public boolean mIsBackVisible = false;
|
|
|
|
+ public boolean mEditable = false;
|
|
|
|
|
|
public Profile(int id, String label, String text, Bitmap icon, boolean editable){
|
|
public Profile(int id, String label, String text, Bitmap icon, boolean editable){
|
|
- this.id = id;
|
|
|
|
- this.label = text;
|
|
|
|
- this.text = label;
|
|
|
|
- this.activated = false;
|
|
|
|
- this.icon = icon;
|
|
|
|
- this.editable = editable;
|
|
|
|
|
|
+ this.mId = id;
|
|
|
|
+ this.mLabel = text;
|
|
|
|
+ this.mText = label;
|
|
|
|
+ this.mActivated = false;
|
|
|
|
+ this.mIcon = icon;
|
|
|
|
+ this.mEditable = editable;
|
|
}
|
|
}
|
|
|
|
|
|
public Profile(int id, String label, String text, int icon, boolean editable){
|
|
public Profile(int id, String label, String text, int icon, boolean editable){
|
|
@@ -36,29 +36,29 @@ public class Profile {
|
|
}
|
|
}
|
|
|
|
|
|
public Profile(int id, String label, String text, String iconPath, boolean editable){
|
|
public Profile(int id, String label, String text, String iconPath, boolean editable){
|
|
- this.id = id;
|
|
|
|
- this.label = label;
|
|
|
|
- this.text = text;
|
|
|
|
- this.activated = false;
|
|
|
|
- this.iconPath = iconPath;
|
|
|
|
- this.editable = editable;
|
|
|
|
|
|
+ this.mId = id;
|
|
|
|
+ this.mLabel = label;
|
|
|
|
+ this.mText = text;
|
|
|
|
+ this.mActivated = false;
|
|
|
|
+ this.mIconPath = iconPath;
|
|
|
|
+ this.mEditable = editable;
|
|
}
|
|
}
|
|
|
|
|
|
public void setIcon(Bitmap bitmap){
|
|
public void setIcon(Bitmap bitmap){
|
|
- this.icon = bitmap;
|
|
|
|
|
|
+ this.mIcon = bitmap;
|
|
}
|
|
}
|
|
|
|
|
|
public void setIcon(int icon){
|
|
public void setIcon(int icon){
|
|
- this.icon = BitmapFactory.decodeResource(MainActivity.context.getResources(), icon);
|
|
|
|
|
|
+ this.mIcon = BitmapFactory.decodeResource(MainActivity.context.getResources(), icon);
|
|
}
|
|
}
|
|
|
|
|
|
public Bitmap getIconBitmap(){
|
|
public Bitmap getIconBitmap(){
|
|
- if(this.icon != null) return icon;
|
|
|
|
|
|
+ if(this.mIcon != null) return mIcon;
|
|
|
|
|
|
- if(this.iconPath != null){
|
|
|
|
|
|
+ if(this.mIconPath != null){
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
|
|
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
|
|
- Bitmap bitmap = BitmapFactory.decodeFile(this.iconPath, options);
|
|
|
|
|
|
+ Bitmap bitmap = BitmapFactory.decodeFile(this.mIconPath, options);
|
|
|
|
|
|
return bitmap;
|
|
return bitmap;
|
|
}
|
|
}
|
|
@@ -71,10 +71,10 @@ public class Profile {
|
|
}
|
|
}
|
|
|
|
|
|
public boolean isEditable(){
|
|
public boolean isEditable(){
|
|
- return this.editable;
|
|
|
|
|
|
+ return this.mEditable;
|
|
}
|
|
}
|
|
|
|
|
|
public Profile cloneProfile(){
|
|
public Profile cloneProfile(){
|
|
- return new Profile(id, label, text, icon, editable);
|
|
|
|
|
|
+ return new Profile(mId, mLabel, mText, mIcon, mEditable);
|
|
}
|
|
}
|
|
}
|
|
}
|