compatibility

Disable hardware acceleration, backward compatibility

点点圈 提交于 2019-12-07 06:59:57
问题 I have a problem with a function ( setLayerType(LAYER_TYPE_NONE, null) ) available in api >=11, and my code should run on android 1.6 (API level 4) too. I have tried to use reflection like this: try { Method method = View.class.getMethod("setLayerType", Integer.TYPE, null); method.invoke(LAYER_TYPE_NONE, null); view.setLayerType(LAYER_TYPE_NONE, null); } catch (Throwable e) { Log.e("_________________test", "Function not found"); } but my app crash at view.setLayerType with java.lang

Can we use jdk7 javac to compile code with java7 features into java6 bytecode

跟風遠走 提交于 2019-12-07 06:15:36
问题 I was considering if a java project could produce 2 jars: one for java7 and one for java6, yes, the source code might use some some java7 new features. so to generate the java6 jar, the command line would be like: javac -target 1.6 -bootclasspath jdk1.6.0\lib\rt.jar -extdirs "" MyApp.java Unfortunately, It simply emits an error: javac: target release 1.6 conflicts with default source release 1.7 According to this document, it should be possible for jdk6 vs jdk5, anybody knows why it doesn't

fontawesome icon not rendering the same in Chrome and Firefox

倖福魔咒の 提交于 2019-12-07 03:38:56
问题 In Chrome/Safari my icon within a bootstrap button looks fine: But in Firefox, the icon drops down a line: I have the fontawesome icon floated right within the <button> . <!--html--> <div class="btn-group btn-group-justified" role="group" aria-label="..."> <div class="btn-group" role="group"> <button type="button" class="btn btn-default btn-small">Cached logs<i class="fa fa-money"></i></button> </div> <div class="btn-group" role="group"> <button type="button" class="btn btn-default btn-small"

Using a kotlin library in java code

人盡茶涼 提交于 2019-12-07 03:09:21
问题 I have a kotlin library FlowLayout lib as aar, and want to use it in my java code (android) but can not to resolve kotlin.Pair . FlowLayoutManager layoutManager=new FlowLayoutManager(3, RecyclerView.HORIZONTAL, new FlowLayoutManager.Interface() { @Override public kotlin.Pair<Integer, Integer> getProportionalSizeForChild(int i) { return null; } }); I have tried android.support.v4.util.Pair but is not compatible. How can I use a kotlin lib in java code with their object dependencies? 回答1: Class

Why my iOS app is not compatible with old devices(e.g. iPhone 4S, 5, iPad 2)?

你离开我真会死。 提交于 2019-12-07 01:55:39
问题 I created app with xcode and selected universal as device and deployment target is iOS 8.0. I sent my app to App Store and approved but I see that list at app page. Requires iOS 8.0 or later. Compatible with iPhone 5s, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone SE, iPad Air, iPad Air Wi-Fi + Cellular, iPad mini 2, iPad mini 2 Wi-Fi + Cellular, iPad Air 2, iPad Air 2 Wi-Fi + Cellular, iPad mini 3, iPad mini 3 Wi-Fi + Cellular, iPad mini 4, iPad mini 4 Wi-Fi + Cellular, 12.9

Oracle equivalent of PostgreSQL INSERT…RETURNING *;

一个人想着一个人 提交于 2019-12-07 01:06:04
问题 I've converted a bunch of DML (INSERT/UPDATE/DELETE) queries from Oracle into PostgreSQL and now I need to check whether they produce the same set of rows, i.e. that delete removes the same rows, assuming the oracle and postgresql databases contain the same data initially, update updates the same rows etc. On PostgreSQL side, I can use the returning clause with DML statements, i.e. INSERT INTO test(id, name) VALUES(42, 'foo') RETURNING *; What's good about the statement above is that I can

buttonStyle not working for 22.1.1

瘦欲@ 提交于 2019-12-06 23:10:25
问题 I´m Using com.android.support:appcompat-v7:22.1.1 This attribute android:buttonStyle is not setting that style for every button, I need to set android:theme="@style/AppTheme.Button" manually on each button. <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:buttonStyle">@style/AppTheme.Button</item> </style> What do I need to do to set a general style for it? 回答1: Use buttonStyle insteadof android:buttonStyle in your theme 回答2: Similar to @danielgomezrico

openOptionsMenu() across android versions

≡放荡痞女 提交于 2019-12-06 16:55:52
I have an app that's been designed with the titlebar hidden in all intents. I want to utilize Activity.openOptionsMenu() from a button. It works fine on 2.2 but when I run the app on honeycomb, calling openOptionsMenu() doesn't seem to work. Is there another way? onclick code here, if it matters. This is inside my mapview activity, extending MapView: OnClickListener ocl = new OnClickListener() { @Override public void onClick (View v) { switch (v.getId ()) { case R.id.b_options: Log.d (TAG, "options clicked"); mymapview.this.openOptionsMenu (); break; case R.id.b_prev: Log.d (TAG, "prev clicked

Android ActionBarCompat, action bar doesn't display correctly

给你一囗甜甜゛ 提交于 2019-12-06 15:56:33
问题 I am using android.support.v7 library for action bar support on old devices and android.support.v4 for fragment support. My application on version Android 2.* doesn't display ActionBar correctly, it stretched to fill the screen and frame layout doesn't showing. ActionBarDrawerToggle button clickable, but it doesn't do anything. There are no errors or warnings shown in the LogCat output. AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android

Migrating from Access 2000/2003 to Access 2010

房东的猫 提交于 2019-12-06 14:01:51
I want to use access 2000 and 2003 databases in access 2010. Since I don't want to check if everythings's working manually I am looking for a tool that analyzes VBA code for errors or compatibility issues that occur using access 2010 (or if available at least access 2007). See utility here and explanations here . And the enternal refrain: COMPILE ! Before and after migrating. 来源: https://stackoverflow.com/questions/7688802/migrating-from-access-2000-2003-to-access-2010