mirror of
https://github.com/cupcakearmy/R6S.git
synced 2026-04-02 09:55:27 +00:00
V1.2
This commit is contained in:
@@ -41,9 +41,7 @@ public class op_view extends Fragment {
|
||||
tmp.setPadding(16, 16, 16, 16);
|
||||
tmp.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
||||
tmp.setBackgroundResource(R.drawable.weapon_selector);
|
||||
if (Build.VERSION.SDK_INT < 23) {
|
||||
tmp.setTextAppearance(home.root(), android.R.style.TextAppearance_Medium);
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
tmp.setTextAppearance(android.R.style.TextAppearance_DeviceDefault_Medium);
|
||||
}
|
||||
tmp.setTextColor(0xffffffff);
|
||||
@@ -59,7 +57,8 @@ public class op_view extends Fragment {
|
||||
//Get Operator Info
|
||||
Bundle b = this.getArguments();
|
||||
SQLiteDatabase db = home.mkdb();
|
||||
Cursor c = db.rawQuery("SELECT * FROM operators WHERE id=" + b.getInt("id"), null);
|
||||
int id = b.getInt("id");
|
||||
Cursor c = db.rawQuery("SELECT * FROM operators WHERE id=" + id, null);
|
||||
c.moveToFirst();
|
||||
|
||||
// Map Of Text Views
|
||||
@@ -117,6 +116,16 @@ public class op_view extends Fragment {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
Drawable d = Drawable.createFromStream(home.root().getAssets().open("OPs/" + String.valueOf(id) + ".jpg"), null);
|
||||
ImageView op_bg = (ImageView) v.findViewById(R.id.op_bg);
|
||||
//Matrix m = (Matrix) new Matrix.ScaleToFit("START");
|
||||
//op_bg.setImageMatrix(m);
|
||||
op_bg.setImageDrawable(d);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
db.close();
|
||||
|
||||
return v;
|
||||
|
||||
Reference in New Issue
Block a user