I have created android application with navigation drawer and when I click item from navigation drawer old fragment is not replaced,I can still see the old fragment under the new fragment.How to fix this issue?
privatevoid displaySelectedScreen(int id)
Fragment fragment = null;
fragment = new Main();
Intent intent = new Intent(this, Settings.class);
Intent intent1 = new Intent(this, About.class);
Intent i = new Intent(Intent.ACTION_SEND);
String sAux = "\nLet me recommend you this application\n\n";
sAux = sAux + "https://play.google.com/store/apps/details?id=Orion.Soft \n\n";
startActivity(Intent.createChooser(i, "choose one"));
fragment = new Feedback();
if (fragment != null)
FragmentManager fragmentManager = getSupportFragmentManager();
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
@Overridepublicboolean onNavigationItemSelected(MenuItem item)
// Handle navigation view item clicks here.int id = item.getItemId();
Hello everyone i need to hashed my password when i put it in my login application android and then i need to compare it with my password in my table fos_user of symfony and the password in fos_user is encoders:bcrypt
This is my code:
// Check whether username or password is set from android if(isset($_POST['username']) && isset($_POST['password']))
// Innitialize Variable
$username = $_POST['username'];
$password = $_POST['password'];
$hash = password_hash($password, PASSWORD_BCRYPT);
// Query database for row exist or not
$sql = "SELECT password FROM fos_user WHERE username = '$username' AND password = '$hash'";
$test = mysql_query($sql) or die( mysql_error() );
$row = mysql_fetch_assoc($test);
if ($hash == $row['password'])
// send result back to android
i have a file named test.rar which have password that i set on it ,cuz i have a database file in it ,
i want to open this file and read data from my database file and use it for my app in android studio .
how can i do it ?
Store the .rar file in your project's assets folder. During runtime, you can access and save that file to the phone's internal storage or the SD card. As I understand it, RAR is a propriatary format so you can't unarchive it using Java's SDK. Use a third party library like junrar to do the unarchiving.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
I am working with googlemap. I have implemented custom marker window, this window contains photo of the marker. I am taking the url of the photo as string and setting it into imageview with thread. However, the code is not syncronized with user. When I have clicked the marker, it shows the photo of the previeus marker that I have clicked. When I did debug, I can see that true url values are coming from background but the setting image into imageview operation is becoming late. How can I solve this problem? I have tried picasso and glide but still same problem.