0
我遇到了一個問題,即唯一的解決方案是使用AbsoluteLayout(只是在特定位置顯示某些東西)。問題複製AbsoluteLayout - com.android.internal.R無法解析
我試圖複製AbsoluteLayout類,以避免在將來的版本中刪除它,並且我的應用程序停止工作。
但是,讓這個問題,首先,我改變了所有的mPadding(方向)getPadding(方向),但仍然是一個錯誤的的LayoutParams構造:
public LayoutParams(Context c, AttributeSet attrs) {
super(c, attrs);
TypedArray a = c.obtainStyledAttributes(attrs,
com.android.internal.R.styleable.AbsoluteLayout_Layout);
x = a.getDimensionPixelOffset(
com.android.internal.R.styleable.AbsoluteLayout_Layout_layout_x, 0);
y = a.getDimensionPixelOffset(
com.android.internal.R.styleable.AbsoluteLayout_Layout_layout_y, 0);
a.recycle();
}
com.android.internal.R cannot be resolved to a variable
我怎樣才能得到這些值?或者某人已經獨立擁有這個不屬於Google的類希望繼續使用API?
泰!這工作完美。 –