当App Inventor将数据发送到Firebase数据库时,我遇到了问题。我得到了这个输出
[..]
private xCustomSpinnerAdapater spinnerAdapter;
private String[] spinnerNames = {"All", "Black", "Blue", "Green", "Red"};
private int[] spinnerImages = {R.drawable.artifact, R.drawable.black, R.drawable.blue, R.drawable.green, R.drawable.red};
[..]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_spell);
spinnerSpells = findViewById(R.id.spellSpinner);
spinnerAdapter = new xCustomSpinnerAdapater(this, spinnerNames,spinnerImages);
spinnerSpells.setAdapter(spinnerAdapter);
spinnerSpells.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
Toast.makeText(getApplicationContext(),spinnerNames[i],Toast.LENGTH_LONG).show();
[...]
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
[...]
});
。
我想删除所有反斜杠或["\"https:\\/\\/firebasestorage.googleapis.com\\/v0\\/b\\/sad-police-app.appspot.com\\/o\\/October 6 19:28:1?alt=media&token=d18ae430-c717-45b4-a82a-6dfefc0756dd\""][1]
,以便打开链接并显示图片。谁能帮我?提前非常感谢您!