将图标添加到svg-sprite后无法正确显示

时间:2018-08-22 19:30:19

标签: svg svg-sprite

我有svg图标:

import { Component, ViewEncapsulation } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styles: [require('./app.component.scss')],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
  title = 'my-app';
}

看起来是这样:

enter image description here

但是当我将其添加到svg-sprite时,它看起来是这样的:

enter image description here

那是gulp-task svg:

    public class MainActivity extends AppCompatActivity {
        private int currentnumber,mod,delay,Curclicks;
    private TextView display;
    private Handler handler;
    private Button next_button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);

        //Binding
        display = findViewById(R.id.tx);
        next_button = findViewById(R.id.next_button);
        //getResources
        Resources res = getResources();

        //getting the data ready
        String[] list = {"1","2","3","4","5","6","7"};
        //assign vars
        handler = new Handler();
        currentnumber = 0;
        Curclicks=0;
        mod = 5;
        delay = 5000;
        //initial view
        next_button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            if(currentnumber == list.length){
                currentnumber = 0;
            }
            if (Curclicks == mod-1) {
                next_button.setEnabled(false);
                display.setText(list[currentnumber]);
                currentnumber++;


                handler.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        //the button will unlock after the delay specified
                        next_button.setEnabled(true);
                        Curclicks = 0;
                    }
                }, delay);
            }
            else {
                display.setText(list[currentnumber]);
                currentnumber++;

            }
            Curclicks++;

        }

    });
}
    }

$。gp-链接到gulp-load-plugins

精灵中的其他图标显示正确。

您可以使用精灵here

下载文件

我不知道此图标发生了什么

0 个答案:

没有答案