w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android: Unwanted left/right margins on Nexus 10 in landscape mode
Ok, so it was embarrassingly straightforward! The margin for the Nexus 10 in landscape mode is taken from the 'values-sw720dp-land' resource folder, which declares a much larger value: <!-- Customize dimensions originally defined in res/values/dimens.xml (such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. --> <dimen name="activity_horizontal_margin">128dp</dimen> After nearly a year of lurking on SO and finding answers to all my questions, the first one I finally decide to ask properly turns out to be as trivial as this...

Categories : Android

Phonegap 3 doesn't work with Android Studio
Upon must digging I found how to get past this: phonegap run android Its as simple as that. [Edit] You need to add platform to work with, whilst the documentation is so very very poor: C:varwwwsexdiaries.co.uksexdiaries>phonegap build android [phonegap] detecting Android SDK environment... [phonegap] using the local environment [phonegap] adding the Android platform... [warning] missing library cordova/android/3.0.0 [phonegap] downloading https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=snapshot;h=3.0.0;sf=tgz... [phonegap] compiling Android... [phonegap] successfully compiled Android app Then you are good to go, doing an import with Andriod Studio will also work now as you have a project to work with :) Fantastic.

Categories : Android

Android Studio proguard doesn't work
I'm not sure because I didn't use Android Studio to build a release apk yet, but try to look at this http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Running-ProGuard You probably need to configure gradle to use proguard, considering that android studio is using it to build

Categories : Android

Android: Scale layout to fit 7" Tablets like Nexus 7
yes, use the different folder for supporting different screen sizes to put a layout specific to a 7" tablet http://developer.android.com/training/basics/supporting-devices/screens.html you would want the folder layout-sw600dp to be specific

Categories : Android

Layout and Drawables for Nexus S and Galaxy Nexus
Nexus s is 233 ppi, so it will fit on hdpi http://developer.android.com/guide/practices/screens_support.html#overview

Categories : Android

How to prepare layout,drawable folders for 7",10" android tablets for both landscape and portrait?
You are naming the folders in the wrong way. In Android, there is a rule or order in which you name your resource folders. You should provide your qualifier names in that order. Check this documentation table on providing resources. Your should name your folders in the order provided in the table.(Its better if you read the whole page, because it'll give you a better understanding in providing resources) Here you should name the folders as layout-large-port-hdpi drawable-large-port-hdpi For preparing the resource folders for tablets, you can use either the screen size attribute or shortest width attribute. For e.g If you use screen size attribute, you can name folders like layout-large-... (for 7" devices) layout-xlarge-... (for 10" devices) I you use shortest width attribute, y

Categories : Android

Nexus 10 - render to external rendertarget works only in landscape
Mali driver support team confirms that this is a driver bug and will fix it in next driver version. As a temporary workaround, they propose to call glViewport after glBindFramebuffer. This workaround works - after changing call order I managed to achieve correct rendering. I've proposed Google to contact ARM to include a fixed OpenGL ES driver for Nexus 10 as soon as fixed driver is available. If anybody is willing for this to happen faster, you can star an issue in Android bug tracker: http://code.google.com/p/android/issues/detail?id=57391 Link to Mali Developer Center forums where I've filed this issue: http://forums.arm.com/index.php?/topic/16894-nexus-10-render-to-external-rendertarget-works-only-in-landscape/ As this driver bug is verified and confirmed by ARM, please go and star

Categories : Android

layout-xxhdpi/layout-xxlarge not supported on Android Studio
As you can see here, section "Declaring Tablet Layouts for Android 3.2": For the first generation of tablets running Android 3.0, the proper way to declare tablet layouts was to put them in a directory with the xlarge configuration qualifier (for example, res/layout-xlarge/). In order to accommodate other types of tablets and screen sizes—in particular, 7" tablets—Android 3.2 introduces a new way to specify resources for more discrete screen sizes. The new technique is based on the amount of space your layout needs (such as 600dp of width), rather than trying to make your layout fit the generalized size groups (such as large or xlarge). The best you can get is: res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation The ones you

Categories : Android

Skipped Frames. Application may be doing too much work on it's main thread” error on android 4.3 nexus 7
In simple terms this error means you are asking your Android system to do too much work on the main thread of this particular application. There are some good general answers on this error, one good example being: http://stackoverflow.com/a/21126690/334402 For your specific example, you may be simply asking it to do too much video related work, which is very processor hungry, on the main thread. It would be worth looking at your 'prepare' method for example and if you are using a streamed source, consider using prepareAsynch - see below from the Android documentation: public void prepareAsync () Added in API level 1 Prepares the player for playback, asynchronously. After setting the datasource and the display surface, you need to either call prepare() or prepareAsync(). For

Categories : Android

Android layout , does it support orientation layout xml files? Does -land work at all?
for the activity in the manifest remove the orientation flag,...then your activity will destroy and recreate itself on rotation giving you the correctly included layout. android:configChanges="keyboardHidden" If you leave it in, it is up to YOU to handle the orientation change with code.

Categories : Android

layout-land not picking landscape layout xml
May be your phone screen density is xhdpi for which you have not kept a folder. Also keep a folder for layout-land-xhdpi and try. you should also keep layout-land-xxhdpi. Or you can just have layout-land

Categories : Android

scrollview doesn't work in my layout
If you want to avoid buttons going up when the keyboard appears you could put android:windowSoftInputMode="adjustNothing" on the activity node of your Android Manifest. Then, they won't bother you when typing.

Categories : Android

'arbor' layout doesn't work in cytoscape.js
From the docs: http://cytoscape.github.io/cytoscape.js/#core/visuals/cy.layout NB: You must reference the version of arbor.js included with Cytoscape.js in the <head> of your HTML document: <head> ... <script src="arbor.js"></script> ... </head> Arbor does some automatic path finding because it uses web workers, and so it must be included this way. Therefore, you can not combine arbor.js with your other JavaScript files — as you probably would as a part of the minification of the scripts in your webapp.

Categories : Javascript

CSS 100% width layout with two panels - why it doesn't work?
Just modify your css for #over : #over { height: 100%; /* Instead of auto */ min-height: calc(100% - 150px); } That should solve your problem. JSFiddle height : auto sets the height as the height of its content, i.e its child elements. height : 100% inherits the height of its parent. So, here, #over calculates the height of #side-nav and #content which in-turn depend on the height of #over. And since, #side-nav and #content don't have any content, so the height for all is 0. So, this problem should be rectified as content builds up. One more solution would be to set min-height for #side-nav and #content with some px value. Hope this helps.

Categories : HTML

Scaling a right aligned layout doesn't work as expected
Apparently, Androids scaling is doing all sorts of bad stuff, for example it does not scale a 9-patch correct. Here is a custom animation for scaling that will solve the above and is compatible with 9-patch images. I also got some info here for the basics, this is just a rewrite of his solution: How to implement expandable panels in Android? public class ExpandAnimation extends Animation { private final int mStartWidth; private final int mDeltaWidth; private View view; public ExpandAnimation(View view, int startWidth, int endWidth) { mStartWidth = startWidth; mDeltaWidth = endWidth - startWidth; this.view = view; } @Override protected void applyTransformation(float interpolatedTime, Transformation t) { android.view.View

Categories : Android

ActiveX doesn't work with Visual Studio
It seems like your inf file is not correct. opening file from file system is different from opening it through localhost for reference please check this link: ActiveX not working on client machine

Categories : C#

TextView setText doesn't work on custome layout in PreferenceFragment
Here is a solution: You need to implement a custom Preference class that extends the Android Preference class. Ensure that your custom class is in a separate file -- not part of another class -- otherwise you will get an 'Inflate XML error' like this. Here's an example: My CustomPreference.java file: public class CustomPreference extends Preference { private TextView txt; public CustomPreference(Context context, AttributeSet attrs) { super(context, attrs); this.setWidgetLayoutResource(R.layout.test_conn); } @Override protected void onBindView(View view) { super.onBindView(view); txt = (TextView) view.findViewById(R.id.summary); } public void setText(String text, int color) { txt.setText(text); txt.setTextColor

Categories : Android

Why doesn't the grid layout work without specifying RowDefinitions and Column Definitions?
You have to specify RowDefinitions and ColumnDefinitions so that it knows how to size the rows and columns. Otherwise it doesn't know whether you want auto-sizing or star-sizing. And it also needs to know how many rows and columns you need up front; it doesn't add them on the fly based on your values of Grid.Row and Grid.Column. I think the code you wrote looks reasonable, and it would be nice if it used a default when you don't specify, but unfortunately it doesn't. Instead, it builds a single-column, single-row grid and stacks all the children on top of each other. I can think of a couple ways to write some XAML that will do what you want. One way: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto"

Categories : Xaml

How to scroll a scrollable layout in the Android Studio?
According to this change set: https://android-review.googlesource.com/#/c/61089/ , there is a fix for this coming soon. I'd hazard a guess you'll see the fix in 0.1.7.

Categories : Android

Cannot Open Layout Files in Android-Studio
In my situation, I had placed a new folder in my res folder with original non-resized images of my icons and resources in case I want to edit them later. This broke Android Studio in several places. As soon as I moved that folder elsewhere, everything returned to normal.

Categories : Android

Layout preview not working in Android Studio
I had the same problem and I solved as follow Update all build.gradle files with: classpath 'com.android.tools.build:gradle:0.5.+' Now android studio 0.2.+ uses gradle 0.5 Closes de IDE and via Terminal/Console Do a clean: $gradle clean Do a build: $gradle build Assemble it: $gradle assembleDebug Open the Android Studio and be happy ;)

Categories : Eclipse

How to change layout (without coding) in Android Studio
When viewing your main activity.xml file, under the component tree right click the layout, and under the "Morphing" menu you will be able to change to a different layout. Note: my Android Studio crashes when I do this!

Categories : Android

Can't edit/review layout files in Android Studio
Android Studio Issue 124715 Solutions : You do that by editing the "studio.exe.vmoptions" file in this path: Program FilesAndroidAndroid Studioin. Remove the line that says "-ea". You can refer this link

Categories : Android

How can I set up custom namespaces in layout file in Android studio?
res-auto uses the current package name, not the library package name. In your case, it translates to net.mypackage. If you want to use the namespace for a library, you need to use its package name. Judging from the class name, you are using the DSLV library from here. So, you'll want to use: xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.dslv"

Categories : Android

Android Studio: Error in Layout Files - Header expected
Click on the word with the red line (that causes the mentioned error) Click Alt+Enter and choose Un-inject Language/Reference That's it! At least this worked for me on the same error

Categories : Android

Graphical view of layout in intellij Idea for android studio?
If you open any layout file, the switch will be displayed as tabs at the bottom: Note that you need to have Android Designer plug-in enabled: It's also important to open the files from the src/main/res/layout directory, not from the build directory. If you open a file under build, latest Android Studio will display a warning on the top of the file: Files under the build folder are generated and should not be edited.

Categories : Android

Android Studio: Android Manifest doesn't exists or has incorrect root tag
I ran into a similar problem. Looks like my .../src directory for whatever reason moved under my .../lib directory. I moved it out of the /lib directory. Now both /lib and /src are at the same level. After a couple of clean rebuilds and restarts of Android studio everything is back to normal. My emulator started up fine. You might want to check your directory structure. Compare the directory structure with a working project. You might be able to see the difference.

Categories : Android

Android: Emulator in Android Studio doesn't start/launch
Well, Android Studio is waiting for you to start the virtual device. You can do that from AVD Manager --> 'Select the device you chose in Android Studio' --> Start. I hope this answers your question

Categories : Android

Preview layout with merge root tag in Intellij IDEA/Android Studio
Android Studio 0.5.8 added support for tools:showIn. By using it it is possible to preview < merge > layouts. http://tools.android.com/recent/androidstudio058released layout/layout_merge.xml with tools:showIn: <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:custom="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:showIn="@layout/simple_relativelayout"> ...... </merge> layout/simple_relativelayout.xml with include: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <include layout="@layout/layout_merge"/> </RelativeLayout>

Categories : Android

Android Studio: distances shown on layout preview appear larger on device
Switch to a RelativeLayout if you can, you can then define android:layout_toRightOf and android:layout_below XML tags. I don't recommend using the GUI to place objects with RelativeLayout as it is quite annoying. It's easier to just place it with XML.

Categories : Android

SketchFlow Template for Windows Phone doesn't work with Blend for Visual Studio
I've also posted to that thread with a solution. Which I will also add here. I've posted a fix for using this template with SketchFlow that ships in Blend/VS2013 (may work in 2012 but I didn't test). Please read my instructions I've tried to be a clear as possible. You WILL need to download and install the SketchFlowWP7.zip file from this codeplex (I also provide a copy in the link below). Extract SketchFlowWP7.zip and run the SketchFlowWP7.msi to install. When it prompts where to install choose the path to your copy of Blend. For instance for VS2013 it's default path is "C:Program Files (x86)Microsoft Visual Studio 12.0Blend" Next you will need to navigate down into the following folder "C:Program Files (x86)Microsoft Visual Studio 12.0BlendProjectTemplatesenCSharpWindowsPhone" Here y

Categories : Misc

Spinner with custom layout doesn't show nothing Android
Try to implement following code instead of your one. private class lenguageSpinnerAdapter extends BaseAdapter implements SpinnerAdapter { private ArrayList<String> lenguages; public lenguageSpinnerAdapter(Context context, ArrayList<String> lenguages) { this.lenguages = lenguages; } public int getCount() { return lenguages.size(); } public Object getItem(int position) { return lenguages.get(position); } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { // This a new view we inflate the new layout LayoutInflater inflater = (LayoutInflater) getAppl

Categories : Android

Don't work git in Android Studio
you need to install git on your computer first. in my case on Ubuntu I installed it with: sudo apt-get install git-core in terminal and followed by : git config --global user.name "NewUser" git config --global user.email newuser@example.com for configurations. That's it and now it works perfectly.

Categories : GIT

Why my app doesn't support nexus 7?
change your manifest to this.. <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="18" /> becaue nexus 7 uses android api 18 that is latest JellyBean....

Categories : Android

Android Studio doesn't see my ZTE Blade III device
Have you opened up the: /path/to/android/sdk/tools/android Android SDK download tool and installed "Google USB Driver" under the "Extras" folder? (Required for Windows. Screenshot from Linux computer)

Categories : Android

Android Studio doesn't create new project
When you are creating a new project, you have to select "Android Application Project" (File --> New--> Android Application Project) instead of directly creating Android Activity. Once you have created a new "Android Application Project", you will find all the required files & then you can go on creating "Blank Activities" (File --> New --> Others--> Android --> Android Activity --> Blank Activity).

Categories : Android

IntelliJ IDEA doesn't open Android *.xml layout files
This was happening to me as well. I couldn't open any layout XML file, but style files and AndroidManifest.xml opened correctly. I fixed this by disabling the Android Designer plugin in Settings/Plugins/Android Designer. Layout files are opening correctly now! I'm hoping JetBrains will fix the root problem in a future update, but for now this workaround will suffice. (I'm running IntelliJ IDEA 12.1.6 Build #IC-129.1359 on OS X 10.9 Mavericks)

Categories : Android

portrait layout wont scroll in landscape orientation
Putting all of your elements inside a scroll view won't really solve anything. Those elements would still need constraints to know how to position themselves in the scroll view. You need to be careful as well, as this solution sounds like something that goes against apples human interface guidelines. I'd advise against ignoring those, as Apple are known to reject apps that do this. I'd say your problem is your constraints simply aren't setup correctly if elements are cover other elements and moving into the wrong places when rotated. Annoyingly the WWDC videos section of the developer site is still down, but when it's back up, have a watch of the video of autolayout in Xcode 5, it will help explain what's going on. If you want elements to completely change position when rotated however

Categories : IOS

Scrolling layout with Webview + LinearLayout in landscape mode
You have to use ScrollView which give you scrolling for you screen. In there your example you use so many component. Take referance of this Web Site

Categories : Android

Android Studio - local path doesn't exist
Try this: Close IDE Remove .idea folder and all .iml files in the project. Restart the IDE and re-import the project. Original post: https://code.google.com/p/android/issues/detail?id=59018

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.