Thursday, June 13, 2013

[General] Saving pdf Files


Saving pdf Files




I have two questions regarding my Nexus 7 and pdf files. I tried to save a pdf attached to an e-mail, and was asked to choose btween Kindle and Quick Office and whether to make the choice permanent or one time. I mistakenly chose Kindle+permanent. Now the only way I can access the pdf is to go to the saved email and click the attachment. Then I get linked to Kindle which opens the pdf. Needless to say that is a lot of unnecessary selection. I tried to find the pdf file with File Manager but could not locate it. I tried to create a bookmark to the email, but could not do that either. So my questions are:

1. How do I undo the permanent choice of Kindle?
2. If I cannot do that, how do I create a link or shortcut or bookmark to the email so I can get to it quickly?
3. How do I find the folder to which the pdf was saved?



.

forum.xda-developers.com

[General] Play Store searches


Play Store searches



I just moved up to the Nexus 4 from a Gingerbread device (Atrix 4g). One of early things I'm noticing are the search results in Play Store app. When I use the keyboard to locate apps with known names, it doesn't find some of them -- as in no results. BUT, when I use voice control in searches, it finds a list of results every time, usually with the app I'm looking for. Anybody else encounter this behavior?



.

forum.xda-developers.com

[General] Questions about third-party launchers and stock ones


Questions about third-party launchers and stock ones



I got the HTC One last Friday and I'm almost set up like I want.

I've tried Nova and Apex and like them both, I just can't decide which one to buy.

The questions I have about launchers are these:

1.- If I set a launcher as the default one, what happens to the stock one? Will it start in the background at boot and consume battery?
2.- Do I have to delete widgets I have from the stock launcher so they don't update or work in the background before setting a third party launcher as the default with its own widgets?

Perhaps I'm just confused, but I expect that the stock launcher won't start at boot, it's widgets won't work in the background and in general, I wont get any battery consumption from the stock with it widgets if I set another one as the default.

Any info on this one? As an aside, which launcher do you guys recommend between Nova and Apex?

Thanks!



.

forum.xda-developers.com

[General] Complete factory reset after rooting?


Complete factory reset after rooting?



I have a few problems in trying to completely recover my Evo. I rooted the phone and did all that was required at the time. Now, I'm giving the phone to somebody else and need to put it back in it's original state pre-root. However, when trying to do a factory reset from either the settings option in the phone or from the HBOOT menu, it does absolutely nothing. I don't know what else to do to clear the device. Any suggestions? Also, could part of the reason be that I removed the SD card that had all of the root data? Thanks in advance!



.

forum.xda-developers.com

[General] Dialer app


Dialer app



Is there any specific app where smartphone quits or exit all its app and just focus on calling bcz some time while some heavy background processes are going on and at that moment i want to call someone so i have to exit some of my app and then i m able to access dialer and if i dont do that it start getting laggy....any help would be appreciated

Sent from my Xolo_X900 using AC Forums mobile app



.

forum.xda-developers.com

[android help] How to play video on a webview


How to play video on a webview



// Try this this a sample Activity that will pay Youtube video



public class MyWebViewClient extends WebViewClient {

public Activity mActivity;

public MyWebViewClient(Activity activity,) {
super();
mActivity = activity;
}

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Uri uri = Uri.parse(url);
if (uri.getHost().contains("youtube.com")) {
IntentUtils.viewYoutube(mActivity, url);
return true;
}

return false;
}

public static void viewYoutube(Context context, String url) {
IntentUtils.viewWithPackageName(context, url, "com.google.android.youtube");
}

public static void viewWithPackageName(Context context, String url, String packageName) {
try {
Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
if (isAppInstalled(context, packageName)) {
viewIntent.setPackage(packageName);
}
context.startActivity(viewIntent);
} catch (Exception e) {
Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
context.startActivity(viewIntent);
}
}

public static boolean isAppInstalled(Context context, String packageName) {
PackageManager packageManager = context.getPackageManager();
try {
packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
return true;
} catch (NameNotFoundException e) {
}
return false;
}

@Override
public void onPageFinished(final WebView view, String url) {
String javascript = "javascript:" +
"var iframes = document.getElementsByTagName('iframe');" +
"for (var i = 0, l = iframes.length; i < l; i++) {" +
" var iframe = iframes[i]," +
" a = document.createElement('a');" +
" a.setAttribute('href', iframe.src);" +
" d = document.createElement('div');" +
" d.style.width = iframe.offsetWidth + 'px';" +
" d.style.height = iframe.offsetHeight + 'px';" +
" d.style.top = iframe.offsetTop + 'px';" +
" d.style.left = iframe.offsetLeft + 'px';" +
" d.style.position = 'absolute';" +
" d.style.opacity = '0';" +
" d.style.filter = 'alpha(opacity=0)';" +
" d.style.background = 'black';" +
" a.appendChild(d);" +
" iframe.offsetParent.appendChild(a);" +
"}";
view.loadUrl(javascript);

super.onPageFinished(view, url);
}


.

stackoverflow.comm

[android help] Avoid Keyboard Pull Activity Layout when shown android


Avoid Keyboard Pull Activity Layout when shown android


Avoid Keyboard Pull Activity Layout when shown 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.

















When i focus on edittext in my application the keyboard open and push my activity layout above the keyboard. The only option i have is to check if the keyboard is open then make the buttons that is pulled above keyboard invisible. I wonder if there is a simple way to disable the layout to get pulled up because this is a common error in every application i build. Also can someone tell me how to check when the keyboard is shown or hide. thanks.


enter image description here


Updates : From my manifest

































InputMethodManager imm = (InputMethodManager)getSystemService(
Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);


this could help


better look at hereenter link description here























Please refer this link, re-sizing the app



android:windowSoftInputMode="adjustResize">





















i think u should change in manifiest



android:windowSoftInputMode="adjustResize|adjustPan">























Try to put this in you manifest :



android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize" >



This will help you and wont pull layout up and also useful in handling configuration change when activity is transferred from Portrait mode to Landscape mode.




















default






.

stackoverflow.comm

[android help] Extra space when orientation changes


Extra space when orientation changes


android - Extra space when orientation changes - 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 have a gridview which works fine ...but when i change the orientation i get extra space at the starting ..example if below is my app in portrait mode



X X X

X X X

X X X


when orientation change below is landscape mode



X X X X
X X X X
X X X X


can you see the space at the beginning ? below is my grid view



android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:verticalSpacing="8dip"
android:horizontalSpacing="4dip"
android:numColumns="auto_fit"
android:columnWidth="145dip"
android:stretchMode="columnWidth"
android:background="#ffffff"
android:paddingTop="6dip"
android:paddingLeft="6dip"
android:paddingRight="2dip"
android:paddingBottom="6dip"
android:drawSelectorOnTop="true"
android:scrollingCache="true"
android:textFilterEnabled="true"
android:visibility="visible" />


















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default






.

stackoverflow.comm

[android help] How to show Unicode characters in Android textview?


How to show Unicode characters in Android textview?


How to show Unicode characters in Android textview? - 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 know this question is asked so many times but none of the accepted answer works for me. I have to fetch facebook friendlist and show it in a listview. To show the friend names, I am using textview. The weird problem is some of the friends wrote their name in their native language in facebook profile so when I am showing them in textview, it just shows some square shaped boxes.Is anybody having idea how to fix this???


EDIT


I checked the Android Facebook Application,in the chat box where online friend names appears there too it shows square boxes instead of the name where as in iOS Facebook it shows the name irrespective of the language.





























What about using such or similar code:



textBox.setText(new String(data, "UTF-8"));


You can manipulate the second parameter. It should work without this though...


//I just saw your edit. So this is a device problem as other said...























This probably means that your device (or the emulator you're using) does not support their native language.




















default






.

stackoverflow.comm

[android help] getActivity() returns null in fragment when i override onBackPressed in parent Activity


getActivity() returns null in fragment when i override onBackPressed in parent Activity



I have an Activity with few tabs manager by ViewPager. And there is one tab where i'd like to prevent closing activity when users click BACK button. Instead it loads upper level of data.


So my code in FragmentActivity looks like this



@Override
public void onBackPressed() {
boolean allowQuit = true;

if (mTabsAdapter != null){
if(mTabsAdapter.getItem(mTabsAdapter.selectedTab) instanceof backPressOverrider){
allowQuit = ((backPressOverrider)mTabsAdapter.getItem(mTabsAdapter.selectedTab)).onCustomBackPressed();
}
}

if (allowQuit) {
super.onBackPressed();
}
}


And it works - activity not finished and I see my fragment, but getActivity() returns null. None of onDetach,onStop, onDestroy,.. was fired in fragment.


Is there any way to overcome this problem?



.

stackoverflow.comm

[android help] Android layout - how to tell a view that it should try to fill it's parent, but at least wraps it's content


Android layout - how to tell a view that it should try to fill it's parent, but at least wraps it's content


Android layout - how to tell a view that it should try to fill it's parent, but at least wraps it's content - 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 tell a view, that it should at least wrap it's content but if the parent view leaves space to stretch, than it should fill it's parent?


























If what you mean is imageview, then you can set



android:layout_width="match_parent"
android:scaleType="centerInside"


For others I'd just set android:layout_width="match_parent" and won't worry too much about it.




















default






.

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...