android-support-library

How can I access getSupportFragmentManager() in a fragment?

人盡茶涼 提交于 2019-12-17 03:52:05
问题 I have a FragmentActivity and I want to use a map fragment within it. I'm having a problem getting the support fragment manager to access it. if (googleMap == null) { googleMap = ((SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map1)).getMap(); // check if map is created successfully or not if (googleMap == null) { Toast.makeText(getApplicationContext(), "Sorry! unable to create maps", Toast.LENGTH_SHORT) .show(); } } // create marker MarkerOptions marker = new

Appcompatv7 - v21 Navigation drawer not showing hamburger icon

喜欢而已 提交于 2019-12-17 03:34:33
问题 I am implementing the lollipop style navigation drawer with latest appcompat support library but the problem is the hamburger icon is never displayed . Only back icon is shown. This is my activity code import android.os.Bundle; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget.Toolbar; import android.view.View; public class Home extends ActionBarActivity {

Best practice for nested fragments in Android 4.0, 4.1 (<4.2) without using the support library

我的未来我决定 提交于 2019-12-17 03:22:24
问题 I'm writing an app for 4.0 and 4.1 tablets, for which I do not want to use the support libraries (if not needed) but the 4.x api only therefore. So my target platform is very well defined as: >= 4.0 and <= 4.1 The app has a multi-pane layout (two fragments, one small on the left, one content fragment on the right) and an action bar with tabs. Similar to this: Clicking a tab on the action bar changes the 'outer' fragment, and the inner fragment then is a fragment with two nested fragments (1.

Best practice for nested fragments in Android 4.0, 4.1 (<4.2) without using the support library

有些话、适合烂在心里 提交于 2019-12-17 03:22:15
问题 I'm writing an app for 4.0 and 4.1 tablets, for which I do not want to use the support libraries (if not needed) but the 4.x api only therefore. So my target platform is very well defined as: >= 4.0 and <= 4.1 The app has a multi-pane layout (two fragments, one small on the left, one content fragment on the right) and an action bar with tabs. Similar to this: Clicking a tab on the action bar changes the 'outer' fragment, and the inner fragment then is a fragment with two nested fragments (1.

Resolved versions for app (22.0.0) and test app (21.0.3) differ

女生的网名这么多〃 提交于 2019-12-17 02:25:46
问题 After upgrading to API 22 and support lib revision 22 I'm getting the following warning: Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (22.0.0) and test app (21.0.3) differ. Gradle itself is more forgiving, but Android Studio, not so much. I have no dependencies declared with 21.0.3 ... is one of the dependent libraries using 21.0.3 and Google forgot to update it with the rest of the batch? My build.gradle with the extras cut out android

Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17<vector> tag requires viewportWidth > 0

♀尐吖头ヾ 提交于 2019-12-17 02:10:41
问题 I try to update my Support Library up to 23.2.0 and face this error: Exception while inflating <vector> org.xmlpull.v1.XmlPullParserException: Binary XML file line #17<vector> tag requires viewportWidth > 0 at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:535) at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:472) at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner

DexIndexOverflowException issue after updating to latest appcompat and support library

…衆ロ難τιáo~ 提交于 2019-12-16 20:13:38
问题 I'm using the below settings through gradle : compileSdkVersion 21 ANDROID_BUILD_MIN_SDK_VERSION=14 ANDROID_BUILD_TARGET_SDK_VERSION=21 ANDROID_BUILD_TOOLS_VERSION=21.0.2 ANDROID_BUILD_SDK_VERSION=21 I also have the following settings in my gradle file: compile 'com.android.support:support-annotations:21.0.0' compile 'com.android.support:appcompat-v7:21.0.0' compile 'com.android.support:support-v4:21.0.0' I always get the error UNEXPECTED TOP LEVEL EXCEPTION . But when I make the 21.0.0 to 20

Failed to resolve com.google.android.gms play-services-auth:11.4.0

馋奶兔 提交于 2019-12-16 19:59:54
问题 I am trying to write code for Android FirebaseUI — Auth in my android project but from last two days, I am getting errors in my current code and don't know how to fix it. trying hard but nothing happened in the right way. here is my build.gradle(project:FriendlyChat) // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() mavenLocal() } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' // NOTE: Do

Error showing support.v7.AppCompatDialogFragment using show() method

。_饼干妹妹 提交于 2019-12-14 03:27:13
问题 I am using v7 support AppCompatDialogFragment in my app import android.support.v7.app.AppCompatDialogFragment; public class LoginDialogFragment extends AppCompatDialogFragment { } Throughout the app I am using default Fragment and FragmentManager and NOT android.support.v4.app.Fragment or adroid.support.v4.app.FragmentManager import android.app.Fragment; import android.app.FragmentManager; Now the problem is I want to show the dialog from an Activity by calling the method public void show(

setProgressViewOffset(boolean, int, int) is undefined for the type SwipeRefreshLayout

感情迁移 提交于 2019-12-14 03:13:35
问题 Using the new SwipeRefreshLayout from Support Revision 21 (or latest today, from sdk manager) I get it to work but I need to move down the view using import android.support.v4.widget.SwipeRefreshLayout; .... mSwipeLayout = (SwipeRefreshLayout) findViewById(R.id.swipe); mSwipeLayout.setProgressViewOffset(false, 100, 150) The method setProgressViewOffset(boolean, int, int) is undefined for the type SwipeRefreshLayout. How to fix this? 回答1: Clean your project and rebuild. You may be compiling