mNavigationView = (NavigationView) findViewById(R.id.nav_view);
View headerView = navigationView.getHeaderView(0);
mUserName = (TextView) headerView.findViewById(R.id.username);
mUserName.setTypeface(cooperHewitt_light);
Related with Error: org.json.JSONException: Value Unable of type java.lang.String cannot be converted to JSONArray
If the code of the JSON part is commented, you get “Unable to retrieve data. URL may be invalid” from:
@Override
protected String doInBackground(String... params) {
//do your request in here so that you don't interrupt the UI thread
//Toast.makeText(ListRoutesActivity.this, "do in background", Toast.LENGTH_LONG).show();
try {
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" >
</Space>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Add app:elevation="0dp" to appbarlayout as shown below:
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/AppTheme.AppBarOverlay"
app:elevation="0dp">
Android part:
http://programmerguru.com/android-tutorial/how-to-upload-image-to-php-server/
Symfony controller:
public function uploadimageAction(Request $request)
DateTime picker in sonata admin forms
->add('fecha', 'sonata_type_datetime_picker', array('label' => 'Fecha', 'format'=> 'dd/MM/yyyy hh:mm',
'dp_side_by_side' => true,
'dp_use_current' => false,
'dp_use_seconds' => false,))
First configure ACL permissions correctly:
https://sonata-project.org/bundles/admin/master/doc/reference/security.html
Remember these 3 things explained in the link:
- Install the ACL tables: php app/console init:acl
- If you have Admin classes, you can install or update the related CRUD ACL rules (I HAD PROBLEMS NOT EXECUTING THIS ONE, REMEMBER TO RUN IT):
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
- Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any
*nix
based command prompt (but not the default Windows Command Prompt!) - Type
cd ~/.ssh
. This will take you to the root directory for Git (LikelyC:\Users\[YOUR-USER-NAME]\.ssh\
on Windows) - Within the
.ssh
folder, there should be these two files:id_rsa
andid_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Typels
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be namedid_rsa
andid_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default. - To create the SSH keys, type
ssh-keygen -t rsa -C "your_email@example.com"
. Th