sudo vi /private/etc/apache2/httpd.conf
Just replace "Deny" with "Allow"
Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
Allow from all
Restart Apache server :
sudo apachectl restart
"It works!"
Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
Allow from all
sudo apachectl restart
android:id="@+id/fragment_place"
android:layout_height="match_parent">
android:id="@+id/fragment_place"
android:layout_marginTop="120dp"
android:layout_height="match_parent"
android:layout_width="match_parent" >
// Create new fragment and transaction
Fragment newFragment = new FragmentDefault();
FragmentTransaction transaction = getFragmentManager().beginTransaction();
// Replace whatever is in the fragment_container view with this fragment,
// and add the transaction to the back stack
transaction.replace(R.id.fragment_place, newFragment);
transaction.addToBackStack(null);
// Commit the transaction
transaction.commit();
public class DDUtil {
public static void setupUI(final Activity activity, View view) {
//Set up touch listener for non-text box views to hide keyboard.
if(!(view instanceof EditText)) {
view.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
hideSoftKeyboard(activity);//MainActivity.this
return false;
}
});
}
//If a layout container, iterate over children and seed recursion.
if (view instanceof ViewGroup) {
for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {
View innerView = ((ViewGroup) view).getChildAt(i);
setupUI(activity, innerView);
}
}
}
public static void hideSoftKeyboard(Activity activity)
{
InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
}
}