This is how to remove title from action bar using appcompat.
First, add the following lines to styles.xml in res/values folder.
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>
<style name="Widget.Styled.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:displayOptions">showHome|useLogo</item>
<item name="displayOptions">showHome|useLogo</item>
</style>
</resources>
Then, change android:theme attribute of your activity in manifest file.
<activity
android:name="MainActivity2"
android:theme="@style/AppTheme" >
You should use same name like the blue text above.
2013년 8월 28일 수요일
2013년 8월 21일 수요일
invalid utf-8 start byte
change charset and(or) pageEncoding to UTF-8.
<%@ page language="java" contentType="application/json; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<%@ page language="java" contentType="application/json; charset=UTF-8"
pageEncoding="UTF-8"%>
2013년 8월 19일 월요일
Could not extract response: no suitable HttpMessageConverter found
Check if content type of server side(for example, jsp file) is
pageEncoding="EUC-KR"%>
application/json(if it is json).
<%@ page language="java" contentType="application/json; charset=EUC-KR"
pageEncoding="EUC-KR"%>
2013년 8월 14일 수요일
2013년 8월 7일 수요일
how to get 100% correct key hash for facebook auth
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Add code to print out the key hash
try {
PackageInfo info = getPackageManager().getPackageInfo(
"com.facebook.samples.hellofacebook",
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
Put the above code in any class file of your app to get correct key hash.
Change "com.facebook.samples.hellofacebook" to your package name. Check log to get key hash and put the hash in the setting of facebook app. 2013년 8월 5일 월요일
Session: an attempt was made to request new permissions for a session that has a pending request
It can be key hash problem. make key hash with release key, and add the key at facebook apps setting with debug key hash. I guess debug key hash is not working.
피드 구독하기:
글 (Atom)