i know that has been asked alot but i'm having a problem in my app . see i added buttons in menu.xml file in menu folder and it showing up however the banner ad cover it in bottom of the app and in the upper the button is not showing up at all
here is picture of my app :Ad covers menu view pic 1 also this
without ads pic 2 . plus i want to enlarge share & rate buttons size...
here is how i want menu button to be like : menu button pic 1 menu pic 2
here is my menu xml code :
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="#+id/privacy"
android:title="#string/privacy_policy"
android:layout_width="150sp"
android:textSize="150sp"
android:layout_height="150sp" />
<item
android:id="#+id/Disclaimer"
android:title="#string/disclaimer"
android:layout_width="150sp"
android:textSize="150sp"
android:layout_height="150sp" />
<item
android:id="#+id/More"
android:title="#string/more_apps"
android:layout_width="150sp"
android:textSize="150sp"
android:layout_height="150sp" />
</menu>
here is my java activity code :
import com.xxx.xxx.database.DataBaseHelper;
import com.xxx.xxx.R;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ProgressBar;
public class MainActivity extends Activity {
InterstitialAd mInterstitialAd;
AdRequest adRequest;
Button start;
ProgressBar progressBar ;
private final int SPLASH_DISPLAY_LENGTH = 2000;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
start = (Button) findViewById(R.id.start);
DataBaseHelper.setmDatabase(this);
AppRater.setAPP_PNAME(this);
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId(SettingsApp.Interstitial);
progressBar=(ProgressBar) findViewById(R.id.progressBar1);
mInterstitialAd.setAdListener(new AdListener() {
#Override
public void onAdClosed() {
requestNewInterstitial();
}
});
requestNewInterstitial();
new Handler().postDelayed(new Runnable(){
#Override
public void run() {
/* Create an Intent that will start the Menu-Activity. */
progressBar.setVisibility(View.GONE);
start.setVisibility(View.VISIBLE);
}
}, SPLASH_DISPLAY_LENGTH);
start.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent=new Intent(MainActivity.this,ListViewsItems.class);
//intent.putExtra("id",""+itemClicked.getDirection());
//startActivityForResult(intent, 1);
startActivity(intent);
if (mInterstitialAd.isLoaded()) mInterstitialAd.show();
finish();
//else Toast.makeText(Start.this, "nonLoaded", Toast.LENGTH_SHORT);
}
});
}
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.privacy:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://xxx.xxx")));
return true;
case R.id.Disclaimer:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://xxx.xxx")));
return true;
case R.id.More:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/developer?id=" + "xxx")));// ADD YOUR DEVELOPER NAME HERE USE + FOR SPACE
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void requestNewInterstitial() {
AdRequest adRequest = new AdRequest.Builder().build();
mInterstitialAd.loadAd(adRequest);
}
}
You are missing the toolbar in your activity.
Try adding it to the xml of your activity:
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
... />
And then setting it as the toolbar:
setSupportActionBar(findViewById(R.id.toolbar))
Related
I have been trying almost everything to get this share button to work. The button is placed right but it's not getting clicked and the share window is not showing.
Secondly, I want it to share Web URL of the page when clicked and I am also unable to understand how to do that.
Moreover, I do not want the button to be hidden in the Action settings. I want it to be displayed on the top bar, that's what's my main problem is.
MainActivity.java
package com.yoalfaaz.yoalfaaz;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.ShareActionProvider;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.support.v4.view.MenuItemCompat;
public class MainActivity extends AppCompatActivity {
private WebView YoWeb;
private ShareActionProvider mShareActionProvider;
SwipeRefreshLayout swipe;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
swipe = (SwipeRefreshLayout) findViewById(R.id.swipe);
swipe.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
#Override
public void onRefresh() {
LoadWeb();
}
});
LoadWeb();
}
public void LoadWeb() {
YoWeb = (WebView)findViewById(R.id.webview);
WebSettings webSettings = YoWeb.getSettings();
webSettings.setJavaScriptEnabled(true);
YoWeb.loadUrl("http://www.yoalfaaz.com");
swipe.setRefreshing(true);
YoWeb.setWebViewClient(new WebViewClient() {
//onPageFinished Method
public void onPageFinished(WebView view, String url) {
//Hide the SwipeRefreshLayout
swipe.setRefreshing(false);
}
});
}
#Override
public void onBackPressed() {
if (YoWeb.canGoBack()) {
YoWeb.goBack();
} else {
super.onBackPressed();
}
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
switch (item.getItemId()) {
case R.id.action_settings:
return true;
default:
return super.onOptionsItemSelected(item);
}
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate menu resource file.
getMenuInflater().inflate(R.menu.menu_main, menu);
// Locate MenuItem with ShareActionProvider
MenuItem item = menu.findItem(R.id.menu_item_share);
// Fetch and store ShareActionProvider
mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(item);
// Return true to display menu
return true;
}
// Call to update the share intent
private void setShareIntent(Intent shareIntent) {
if (mShareActionProvider != null) {
mShareActionProvider.setShareIntent(shareIntent);
}
}
private Intent createShareIntent() {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
shareIntent.setType("text/plain");
startActivity(shareIntent);
return shareIntent;
}
}
menu_main.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.yoalfaaz.yoalfaaz.MainActivity">
<item
android:id="#+id/menu_item_share"
android:showAsAction="ifRoom"
android:title="Share"
app:actionProviderClass="android.support.v7.widget.ShareActionProvider"
app:showAsAction="always" />
<item
android:id="#+id/action_settings"
android:orderInCategory="100"
android:title="#string/action_settings"
app:showAsAction="never" />
</menu>
First, the button is not clickable.
Second, how to share the current page URL?
These are the two queries which I am unable to solve.
I have problem with button in activity_main.xml,
I need to launch by click on "imageButton8" a webView (website URL) in application.
MainActivity.Java
package com.XX.app;
import com.XX.app.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.ImageButton;
public class MainActivity extends Activity {
WebView view;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Empêcher le téléphone de passer en mode veille
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
//When User click on the button imageButton8 the Activity2 launch
Button imageButton8 = (Button) findViewById(R.id.imageButton8);
setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), Activity2.class);
startActivityForResult(intent, 0);
}
});
}
private void setOnClickListener(OnClickListener onClickListener) {
// TODO Auto-generated method stub
}
//loads RETURN URL on lastpage
#Override
public void onBackPressed() {
if(this.view.canGoBack())
{
this.view.goBack();
} else {
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("إغلاق تطبيق جمعية البر و التعاون")
.setMessage("هل أنت متأكد أنك تريد إغلاق تطبيق جمعية البر و التعاون ؟")
.setPositiveButton("نعم", new DialogInterface.OnClickListener()
{
#Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
.setNegativeButton("لا", null)
.show();
}
}
}
activity_main.xml for imageButton8 is
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/background_1">
<ImageButton
android:id="#+id/imageButton8"
android:onClick="click"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginLeft="140dp"
android:layout_marginTop="380dp"
android:background="#0000"
android:scaleType="fitXY"
android:src="#drawable/btn_www" />
</RelativeLayout>
Activity2.java
package com.XX.app;
import com.XX.app.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.app.Application;
import android.os.Bundle;
public class Activity2 extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_webview);
}
}
activity_webview.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/background_1">
<WebView
android:id="#+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
</RelativeLayout>
In the same project,
2. Others Issues: I have 08 buttons. How do I execute each button in its template xml?
For example: Button 1 => about_obama.xml. When user click (in this file) it will find the description of obama.
Button 2 => ....xml...etc!
Button 3......
You need to set the onclickListener for the ImageButton using the ImageButton's setOnClickListener() method. So, in your MainActivity, inside your onCreate() method, do the following:
Button imageButton8 = (Button) findViewById(R.id.imageButton8);
// Set the OnClickListener on the button itself
imageButton8.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, Activity2.class); // Use the MainActivity context
startActivityForResult(intent, 0);
}
});
// You should delete the private setOnClickListener() method as it does not
// have any purpose
To specify the onClick() in the xml when the Button is clicked, set the:
android:onClick:"some_method"
property for your button. Then declare and define this method in your Activity.
I am creating an app in android.
In this app i want to show google Map after click on button.
I have declared button and i declared listener.
But my problem is i want to call another activity class in the action listener and show google map.
But it is not working, I changed emulator from google to Android it work but google API is not called and shows me error.
for this i used this code But my Map is not show and my Application is Terminated .
//----------------Main Activity ---------------//
import java.security.PublicKey;
import com.google.android.maps.MapView;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.os.Build;
public class MainActivity extends ActionBarActivity {
EditText TextFeild;
Button button1;
Context context=this;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
addOnListenerAction();
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment()).commit();
}
}
public void addOnListenerAction()
{
TextFeild=(EditText) findViewById(R.id.editText1);
button1=(Button) findViewById(R.id.button1);
button1.setOnClickListener(new OnClickListener()
{
#Override
public void onClick(View v)
{
Intent intent=new Intent(context,MapViwer.class);
}
});
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public static class PlaceholderFragment extends Fragment {
public PlaceholderFragment() {
}
#Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
return rootView;
}
}
}
//_-------------------MapViwer Class------------//
import android.os.Bundle;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
public class MapViwer extends MapActivity
{
MapView map;
public void onCreate(Bundle setInstanceState)
{
super.onCreate(setInstanceState);
setContentView(R.layout.activity_main);
map=(MapView) findViewById(R.id.mapView);
}
#Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
So you're saying, you have a class named (MapViwer) that defines a layout and the class (MapViwer) contains information for the map to work. To deploy a class from your MainActivity.class, use the following method.
in MainActivity, under the public class add this
private Button button1;
then add this function -
button1.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View arg0) {
Intent i = new Intent(getApplicationContext(), MapViwer.class);
startActivityForResult(i, 100);
}
});
Use it like this..It worked for me..
Button b=(Button) findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent=new Intent(MainActivity.this,MapViewer.class);
startActivity(intent);
}
});
and in the Mapviewer class just call the mapviewer.xml
Now, the mapviewer.xml should look like this
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:id="#+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="34dp" />
</LinearLayout>
Try it out..
Replace context with Mainactivity.this in the code
Intent intent=new Intent(context,MapViwer.class);
You just only defined intent but didn't call the Mapviewr activity
Correct code:
public void addOnListenerAction()
{
TextFeild=(EditText) findViewById(R.id.editText1);
button1=(Button) findViewById(R.id.button1);
button1.setOnClickListener(new OnClickListener()
{
#Override
public void onClick(View v)
{
Intent intent=new Intent(Mainactivity.this,MapViwer.class);
startActivity(intent);
}
});
}
I am building an app for android, and while setting up my settingActivity and i get this error:
This happens when I start the activity. Before I moved the setContentView(R.layout.activity_setting); to the start of the onCreate() function, the application threw a NullPointerException at b.setOnCLickListener().
Now it throws a RuntimeException at the setContentView(); How do I resolve this?
01-18 14:28:59.116: E/AndroidRuntime(9463): java.lang.RuntimeException: Unable to start activity ComponentInfo{tk.yteditors.london2013/tk.yteditors.london2013.SettingActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
01-18 14:28:59.116: E/AndroidRuntime(9463):
at tk.yteditors.london2013.SettingActivity.onCreate(SettingActivity.java:27)
Java code:
package tk.yteditors.london2013;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class SettingActivity extends PreferenceActivity{
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupActionBar();
setContentView(R.layout.activity_setting);
Button b = (Button) findViewById(R.id.sendAnswers);
b.setOnClickListener(new OnClickListener(){
#Override
public void onClick(View pView) {
sendAnswers();
}
});
}
/**
* Set up the {#link android.app.ActionBar}, if the API is available.
*/
#TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public boolean onOptionsItemSelected(MenuItem item){
switch(item.getItemId()){
case R.id.MenuSettings:
//boo
return true;
default:
return super.onOptionsItemSelected(item);
}
}
public void sendAnswers(){
final Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.activity_confirm_dialog);
dialog.setTitle("Antwoorden verzenden?");
((Button) dialog.findViewById(R.id.dialogNo)).setOnClickListener(new OnClickListener(){
#Override
public void onClick(View arg0) {
dialog.dismiss();
}
});
((Button) dialog.findViewById(R.id.dialogYes)).setOnClickListener(new OnClickListener(){
#Override
public void onClick(View v) {
EditText edit = (EditText) dialog.findViewById(R.id.sendAnswers);
packHTML(edit.getText().toString());
}
});
}
public void packHTML(String name){
try {
String fileDir = "/sdcard/LondonAnswers";
File dir = new File(fileDir);
dir.mkdirs();
String fileName = name +new Random().nextLong() +".html";
File file = new File(dir, fileName);
FileWriter fw = new FileWriter(file, false);
fw.append("<html>\n");
fw.append("<head><title>" +name +"'s antwoorden</title></head>\n");
fw.append("<body>\n");
fw.append("<h1>" +name +"'s antwoorden</h1>\n");
fw.append("</body>\n");
fw.append("</html>");
fw.close();
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("webAdress", "file://" +fileDir +fileName);
startActivity(intent);
} catch (IOException e) {
Toast t = new Toast(this);
t.setText("Er is iets mis gegaan tijdens het maken van het bestand");
t.setDuration(Toast.LENGTH_SHORT);
t.show();
e.printStackTrace();
}
}
}
xml:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Antwoorden"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="#+id/sendAnswers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Verzend antwoorden" />
<Button
android:id="#+id/removeAnswers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Verwijder antwoorden" />
<Button
android:id="#+id/answersNYI"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="NYI" />
</LinearLayout>
</ScrollView>
PreferenceActivity is-a ListActivity, and a ListActivity requires a layout which has a ListView with id #android:id/list. This is also shown in the exception you posted:
Your content must have a ListView whose id attribute is 'android.R.id.list'
Now, it seems that your code doesn't appear to be that of a regular Android preferences activity. Therefore you should change the extends PreferencesActivity to just extends Activity.
I am new to android and I tried to implement onclicklistener on image view. But it's not working.. Please help. When I click on the image it dose not responds.
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
//Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
ImageView ad = (ImageView) findViewById(R.id.imageView1);
ad.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent(MainActivity.this, ads.class));
}
});
return true;
}
}
this is my code...
I think you should declare your ImageView in onCreate() as below:
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView ad = (ImageView) findViewById(R.id.imageView1);
ad.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent(MainActivity.this, ads.class));
}
});
}
You have two problems
First:
startActivity(new Intent(MainActivity.this, ads.class));
The second argument should be an activity
Second:
In your case, the ImageView and the listener should be in your onCreate()
When I had a similar issue, I got it fixed it by adding android:layout_width="44dp" to make sure user would have enough area to click on. Then, you can align image content the way you wannt. In my case:
<ImageView
android:id="#+id/locationImageView"
android:layout_width="44dp"
android:layout_height="16dp"
android:layout_centerVertical="true"
android:layout_marginStart="4dp"
android:layout_toEndOf="#id/locationText"
android:adjustViewBounds="true"
android:scaleType="fitStart"
android:src="#drawable/icn_edit_small_white"/>