package safeluck.drive.evaluation.fragment;
|
|
import android.graphics.drawable.Drawable;
|
import android.os.Bundle;
|
import android.os.Handler;
|
import android.support.annotation.NonNull;
|
import android.support.annotation.Nullable;
|
import android.support.v7.widget.Toolbar;
|
import android.view.LayoutInflater;
|
import android.view.View;
|
import android.view.ViewGroup;
|
import android.widget.TextView;
|
|
import me.yokeyword.fragmentation.SupportFragment;
|
import safeluck.drive.evaluation.R;
|
|
/**
|
* MyApplication2
|
* Created by lzw on 2019/3/22. 11:07:11
|
* 邮箱:632393724@qq.com
|
* All Rights Saved! Chongqing AnYun Tech co. LTD
|
*/
|
public class InspectSignalFragment extends SupportFragment {
|
|
private TextView textView_turnLight;
|
private Toolbar toolbar;
|
|
public static SupportFragment newInstance(){
|
return new InspectSignalFragment();
|
}
|
|
@Nullable
|
@Override
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
View view = inflater.inflate(R.layout.layout_check_signal,container,false);
|
initView(view);
|
return view;
|
}
|
|
private void initView(View view) {
|
toolbar =view.findViewById(R.id.toolbar);
|
toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.ic_arrow_back_white_24dp,null));
|
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
@Override
|
public void onClick(View v) {
|
_mActivity.onBackPressed();
|
}
|
});
|
toolbar.setTitle("查看车载信号输入");
|
textView_turnLight = view.findViewById(R.id.tv_fog_lamp);
|
final Drawable left = getResources().getDrawable(R.drawable.green_light,null);
|
new Handler().postDelayed(new Runnable() {
|
@Override
|
public void run() {
|
textView_turnLight.setCompoundDrawablesWithIntrinsicBounds(left,null,null,null);
|
}
|
},5*1000);
|
}
|
}
|