|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.fongmi.android.tv.bean; |
|
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint; |
|
|
|
|
import android.view.View; |
|
|
|
|
|
|
|
|
|
import com.fongmi.android.tv.R; |
|
|
|
|
import com.fongmi.android.tv.utils.ResUtil; |
|
|
|
|
@ -8,7 +9,10 @@ import com.fongmi.android.tv.utils.ResUtil; |
|
|
|
|
public class Func { |
|
|
|
|
|
|
|
|
|
private final int resId; |
|
|
|
|
private final int id; |
|
|
|
|
private int drawable; |
|
|
|
|
private int nextFocusLeft; |
|
|
|
|
private int nextFocusRight; |
|
|
|
|
|
|
|
|
|
public static Func create(int resId) { |
|
|
|
|
return new Func(resId); |
|
|
|
|
@ -16,6 +20,7 @@ public class Func { |
|
|
|
|
|
|
|
|
|
public Func(int resId) { |
|
|
|
|
this.resId = resId; |
|
|
|
|
this.id = View.generateViewId(); |
|
|
|
|
this.setDrawable(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -23,10 +28,30 @@ public class Func { |
|
|
|
|
return resId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getId() { |
|
|
|
|
return id; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getDrawable() { |
|
|
|
|
return drawable; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getNextFocusLeft() { |
|
|
|
|
return nextFocusLeft; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setNextFocusLeft(int nextFocusLeft) { |
|
|
|
|
this.nextFocusLeft = nextFocusLeft; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getNextFocusRight() { |
|
|
|
|
return nextFocusRight; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setNextFocusRight(int nextFocusRight) { |
|
|
|
|
this.nextFocusRight = nextFocusRight; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getText() { |
|
|
|
|
return ResUtil.getString(resId); |
|
|
|
|
} |
|
|
|
|
|