Friday, May 17, 2013

[General] Case Advice


Hi folks, I recently bought an RK3066 based tablet (JUSTOP Jtouch 7" which so far has proved very good value for money!) and I'm looking for a case for it. Ideally I'd like one that's custom fitted but haven't been able to find one anywhere. As alternatives I've been looking at the generic style with the four elastics at each corner but I'm a bit worried about whether or not the tablet will be secure and also if the corner tab will press on the power button so anyone's experience of this type and how well it works it would be most welcome. The other one I was looking at is made by Techguard and has a pad of something called 'Ninja Tape' which sticks to the back of the tablet and holds it in place. Again, I'm worried about the security of the tablet in the case so if anyone has any advice it would be most welcome!!



.

forum.xda-developers.com

[General] HTML over ActiveSync - JB 4.2.2 vs iOS 6


Hi guys,

My first post on the forums after having been an avid consumer for so long.

Unfortunately I have a quibble to begin with that involves one of my most used functions on a smartphone - Corporate Email. I have been using iOS based devices for ActiveSync based email for years and have always been impressed with OOTB HTML support. What I fail to understand is why in 2013 with Jelly Bean 4.2.2, can we not have a similar experience on our Android devices?

I have attached a side-by-side comparison of how a HTML table is represented in iOS 6, vs how it is represented in the mail client on Jelly Bean 4.2.2. This is Exchange 2010 btw and I built this server myself for my company. So if there is anything I need to do at the backend to make this work, I can affect those changes.

I have read post after post about 'try TouchDown'...'try K-9'... and many many justifications as to why the Android support is better regardless. To be honest, I don't want an alternative app to replace what comes with Android natively. I love my Android experience and this is the final bastion before I would relinquish my grip from the iOS realm.

If anyone can provide a technical insight to why Google have progressed this far without proper functionality, or maybe a hack to make this work, I would be greatly appreciative.

Thanks in advance and I love your work!



.

forum.xda-developers.com

[General] "Broken Images" in Gallery Shot With Phone


I recently bought a GS4, and I've been learning my way around the camera and gallery, but today after shooting a bunch of photos to the SD card, half of them are all "broken images" and can't be viewed. I reformatted the SD, but I'm not sure if that is going to solve the issue. A friend of mine had the same problem when he had an HTC Inspire.

Any idea why this is happening and how I can fix/prevent this?



.

forum.xda-developers.com

[General] Contacts don't all sync from exchange to Samsung Galaxy S2


Our organisation just changed from ADSL to Fibre Optic cable, and as a result we all had reconnect our devices to the exchange server. As a result, not all my outlook contacts come down from the MS exchange server. I can see them in 'Contacts' in Outlook on my Mac, I can see them in 'Contacts' in the remote desktop, but they are not visible on my phone.

Emails sync down fine, as well as 95% of my contacts.



.

forum.xda-developers.com

[android help] Android - Which layout to listen to implement gestures in my application


I want my application to listen to gesture. Just a simple gesture l-r, r-l. So, from the main layout, when you swipe from left to right, a sidemenu appears. And when you swipe from right to left, side menu hides. But what i did was, I let sideMenu listen for the ontouch, so when the sidemenu is hidden, I can't show it by just swiping the mainlayout. But i managed to hide that sidemenu after it was shown because i tried to show it first.


So, i tried to listen from my multiColumnListView. It worked but now I can't scroll my multiColumnListView. Also, the problem with placing the listener in the multiColumnListView, when there's is no content, no one will listen the gesture.


enter image description here


The red, orange and maroon boxes are my headers and footers. The multiColumnListView is the broken yellow green box. Then the contents are the green boxes. Then the right image is when there is no content. This is my current layout:



xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ignoreGravity="@+id/sideMenu"
android:id="@+id/mainRelativeLayout">

android:id="@+id/frameLayout"
android:layout_below="@+id/header_1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

android:id="@+id/search_header"
layout="@layout/search_header" />

xmlns:pla="http://schemas.android.com/apk/res-auto"
android:id="@+id/multiColumnListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >


android:id="@+id/sideMenu" />



android:id="@+id/header_1"
android:layout_alignParentTop="true"
layout="@layout/header_1"/>




I tried listening from my RelativeLayout. Though it work but when there are contents, i should start the gesture from the left most part.



final GestureDetector gdt = new GestureDetector(this,new GestureListener());
sideMenu.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(final View view, final MotionEvent event) {
gdt.onTouchEvent(event);
return true;
}
});

final GestureDetector gest = new GestureDetector(this,new GestureListener());
mainLayout.setOnTouchListener(new OnTouchListener() {

@Override
public boolean onTouch(final View v, final MotionEvent event) {
gest.onTouchEvent(event);
return true;
}
});


This is how i listen. I listen from my relativelayout and sidemenu. But I want also to listen from the center of my application eventhough there are contents(multicolumnlistview).


How can i listen from multicolumnlistview without ruining its scroll? Or are there other ways to listen for gestures? Any ideas? Help is greatly appreciated.



.

stackoverflow.comm

[android help] Taking over the volume key on Android


It's important to return true if you handled the event, but if you didn't handle the event, it's good to make sure that the event is still handled by the superclass. Here's some code from my app:



@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
changeColor(keyCode);

return true;
}

return super.onKeyDown(keyCode, event);
}

@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
// do nothing

return true;
}

return super.onKeyUp(keyCode, event);
}


In my case, the superclass call was necessary so that other hardware buttons on my device continued to work.



.

stackoverflow.comm

[android help] Android Safe Start Mode for Application

Android Safe Start Mode for Application - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















Is it possible to have a safe start mode for your Android Application. In the sense that the application will not start the main activity (which is intense) but will open another activity which will have tools to fix some of these problems.


























My suggestion would be to create flag in shared preferences to store whether your app was closed properly or check something else you need. Then add one part before (activity or what you need) where you check this and decide about the mode you are getting in.


Hope this helps and enjoy your work.




















default






.

stackoverflow.comm

[android help] Counting the number of controls in Android

Counting the number of controls in Android - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I'm new to android, right now I am trying to find a way to get the number of controls (I don't know how to call these in android, I mean like I have 4 textviews, 2 edittexts, 3 buttons so in total I have 9 "controls"), is there any way to count them?


Thanks in advanced.


























They're called Views in Android. Yes, even the buttons. Are you creating them in XML or programmatically? Is there a static number or are there ever going to be more or less? You can use getChildCount() but you'd have to do it recursively if you have views inside views.




















default






.

stackoverflow.comm

[android help] Android form elements have different sizes on different emulators


Update #1


I observed that setting the text size as 20sp will cause the input elements to appear normally on devices smaller than 5". It seems that reducing the text size did not reduce the size of the input box. Is this supposed to be normal?


TLDR version


Hi there,


I am facing a problem with the size of input elements in my Android project. The input elements appear larger on devices that are < 5" in size, but appear otherwise normal on my larger devices.


The below screenshots illustrate this. Any idea what could be the cause?


Detailed version


Hi there,


I am currently facing an odd problem with the size of my form elements in my Android project across different emulators. As this is the first time I am creating a mobile application, please feel free to enlighten me if this is a "feature", rather than a bug.


On the Nexus 7 layout preview, the form elements appear as I expected:


enter image description here


However, on the Galaxy Nexus layout preview, the form elements appear larger than expected, which is not desirable:


enter image description here


I have tried many methods, but have been unable to resolve this problem. This problem occurs on all devices that are less than 5" in screen size.


Here is my layout XML file:



xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >

android:id="@+id/register_link"
style="@style/FormFont.Label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="3dp"
android:clickable="true"
android:onClick="onClickRegisterLink"
android:text="@string/register_link_text" />

android:id="@+id/layout_layout_form"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_above="@+id/register_link"
android:gravity="center" >

android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/layout_form"
android:layout_alignRight="@+id/layout_form"
android:layout_marginBottom="50dp"
android:contentDescription="@string/logo_description"
android:src="@drawable/logo" />

android:id="@+id/layout_form"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/logo"
android:gravity="center" >

android:id="@+id/label_username"
style="@style/FormFont.Label"
android:layout_alignBottom="@+id/input_username"
android:layout_alignLeft="@+id/label_password"
android:layout_alignRight="@+id/label_password"
android:layout_alignTop="@+id/input_username"
android:layout_toLeftOf="@+id/input_username"
android:gravity="right"
android:text="@string/label_username" />

android:id="@+id/label_password"
style="@style/FormFont.Label"
android:layout_alignBottom="@+id/input_password"
android:layout_alignTop="@+id/input_password"
android:layout_below="@+id/label_username"
android:layout_marginRight="50dp"
android:layout_toLeftOf="@+id/input_password"
android:gravity="right"
android:text="@string/label_passphrase" />

android:id="@+id/input_username"
style="@style/FormFont.Input"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:inputType="text" />

android:id="@+id/input_password"
style="@style/FormFont.Input"
android:layout_alignLeft="@+id/input_username"
android:layout_alignRight="@+id/input_username"
android:layout_below="@+id/input_username"
android:layout_marginTop="30dp"
android:inputType="textPassword" />

android:id="@+id/button_login"
style="@style/FormFont.Label"
android:layout_alignLeft="@+id/input_password"
android:layout_alignRight="@+id/input_password"
android:layout_below="@+id/input_password"
android:layout_marginTop="35dp"
android:gravity="center"
android:text="@string/button_login" />







My /res/values/styles.xml:




















My /res/values-large/styles.xml:




















Please let me know if you have encountered this before and have an idea of what could be the cause :) Thank you very much!



.

stackoverflow.comm

[android help] Android 3rd party JAR libraries quit working with latest Android tool updates (22.0.0.v201305140200--675183)


I had the strangest thing happen today: I allowed my Eclipse for Mobile Developers (v Juno SR2, which is running on 64-bit Windows 7) to download and install the latest Android updates today. Went from 21.1.0v201302060044-569685 to 22.0.9.v201305140200--675183 and all of a sudden anytime I try to use any class, method, or value that is from a JAR that has been included in my project I get "java.lang.NoClassDefFoundError" exceptions.


These are JARs which are in my "libs" folder. I have 2 of these "external libraries" and both of them cause this same exception to be thrown anytime I attempt to create an object from them (or any other PME functionality). This all started after upgrading to v22.0.9 of the tools (DDMS, ADT, Hierarchy Viewer, NDT, Traceview, and Tracer for OpenGL ES). In other words, this all worked for months before doing this upgrade.


Any ideas on why my JAR'd code quit working with this upgrade, or what to do to fix it?



.

stackoverflow.comm

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...