本文整理了Java中android.support.v7.app.AppCompatDelegate.setCompatVectorFromResourcesEnabled()
方法的一些代码示例,展示了AppCompatDelegate.setCompatVectorFromResourcesEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppCompatDelegate.setCompatVectorFromResourcesEnabled()
方法的具体详情如下:
包路径:android.support.v7.app.AppCompatDelegate
类名称:AppCompatDelegate
方法名:setCompatVectorFromResourcesEnabled
暂无
代码示例来源:origin: fython/BreadcrumbsView
@Override
public void onCreate() {
super.onCreate();
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
}
代码示例来源:origin: material-components/material-components-android-codelabs
@Override
public void onCreate() {
super.onCreate();
instance = this;
this.setAppContext(getApplicationContext());
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
}
代码示例来源:origin: gjiazhe/LayoutSwitch
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
initItemsData();
gridLayoutManager = new GridLayoutManager(this, SPAN_COUNT_ONE);
itemAdapter = new ItemAdapter(items, gridLayoutManager);
recyclerView = (RecyclerView) findViewById(R.id.rv);
recyclerView.setAdapter(itemAdapter);
recyclerView.setLayoutManager(gridLayoutManager);
}
代码示例来源:origin: ImangazalievM/CircleMenu
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom1);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
final ViewGroup snackbarContainer = findViewById(R.id.snackbar_contaner);
final CircleMenu circleMenu = findViewById(R.id.circle_menu);
circleMenu.setOnItemClickListener(new CircleMenu.OnItemClickListener() {
@Override
public void onItemClick(CircleMenuButton menuButton) {
Snackbar.make(snackbarContainer, menuButton.getHintText(), Snackbar.LENGTH_LONG).show();
if (!menuButton.isShowClickAnim()) {
circleMenu.close(true);
}
}
});
}
}
代码示例来源:origin: varunon9/Remote-Control-PC
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
setContentView(R.layout.activity_main);
// selecting connect fragment by default
replaceFragment(R.id.nav_connect);
thisActivity = this;
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
/*FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});*/
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
checkForPermission();
}
}
代码示例来源:origin: appwise-labs/NoInternetDialog
boolean cancelable) {
super(context);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
代码示例来源:origin: lizhifeng-sky/VideoEdit
@Override
protected final void onCreate(Bundle savedInstanceState) {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
super.onCreate(savedInstanceState);
代码示例来源:origin: fasteque/rgb-tool
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_color_picker);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
ButterKnife.bind(this);
代码示例来源:origin: ImangazalievM/CircleMenu
setContentView(R.layout.activity_main);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
代码示例来源:origin: CityZenApp/Android-Development
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
setContentView(R.layout.activity_main);
//load last known location from SharedPreferences
lastKnownLocation = new StorageUtil(this).getLastKnownLocation();
if (lastKnownLocation == null) {
registerReceiver(locationEnabledReceiver, new IntentFilter("LOCATION_ENABLED"));
}
//request permissions
requestWriteExternalStoragePermission();
getStatusBatColor();
updateStatusBarColor();
viewSetup();
setupOsmConnection();
// AppLog.log("OAUTH");
// AppLog.log(osm.getUserAgent());
// AppLog.log(osm.getApiUrl());
// AppLog.log(osm.getOAuth().getConsumerKey());
// AppLog.log(osm.getOAuth().getConsumerSecret());
// AppLog.log(osm.getOAuth().getRequestParameters());
// logUserInfo();
}
代码示例来源:origin: abrenoch/hyperion-android-grabber
private void initActivity() {
// assume the recorder is not running until we are notified otherwise
mRecorderRunning = false;
setContentView(R.layout.activity_main);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
mMediaProjectionManager = (MediaProjectionManager)
getSystemService(Context.MEDIA_PROJECTION_SERVICE);
ImageView iv = findViewById(R.id.power_toggle);
iv.setOnClickListener(this);
iv.setOnFocusChangeListener(this);
iv.setFocusable(true);
iv.requestFocus();
ImageButton ib = findViewById(R.id.settingsButton);
ib.setOnClickListener(this);
ib.setOnFocusChangeListener(this);
ib.setFocusable(true);
setImageViews(mRecorderRunning, false);
LocalBroadcastManager.getInstance(this).registerReceiver(
mMessageReceiver, new IntentFilter(BROADCAST_FILTER));
// request an update on the running status
checkForInstance();
}
代码示例来源:origin: apptentive/apptentive-android
} else {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
代码示例来源:origin: materialos/android-icon-pack
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
代码示例来源:origin: apptentive/apptentive-android
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
final Drawable alternateUpArrow = ResourcesCompat.getDrawable(getResources(),
navIconResId,
代码示例来源:origin: jorgegil96/All-NBA
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
FirebaseApp.initializeApp(context);
firebaseAnalytics = FirebaseAnalytics.getInstance(context);
if (LeakCanary.isInAnalyzerProcess(this)) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
return;
}
LeakCanary.install(this);
Once.initialise(this);
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
} else {
Timber.plant(new CrashlyticsTree());
}
appComponent = DaggerAppComponent.builder()
.appModule(new AppModule(this))
.dataModule(new DataModule("https://nba-app-ca681.firebaseio.com/",
"http://data.nba.com/"))
.build();
}
内容来源于网络,如有侵权,请联系作者删除!