johnson dubula's Profile

About

 
Points: 10

Contact

 

johnson dubula
May 31, 2016 · Public

Please assist with something, i am trying to add admobs on the app but it doesn't show on the app when i run it, but it appears on the android studio preview

this code is on the main activity layout
com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id">




this code is on the questions activity class

setContentView(R.layout.activity_main);
AdView adView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);

johnson dubula
April 25, 2016 · Public

good day guys

i have created a custom listview with pictures and text, now i want to open an activity for each item on the list, how do i do that? i know how to toast i just dont know how to open a new activity for each item on the listview. bellow is my Code

private void registerClickCallback() {

ListView list=(ListView)findViewById(R.id.carslistview);
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView parent, View view, int position, long id) {


}
});
}

johnson dubula
April 8, 2016 · Public

how do i make every item on my list view open a new activity and have a different colour

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

ListView listView1 = (ListView) findViewById(R.id.listView1);

String[] items = { "Milk", "Butter", "Yogurt", "Toothpaste", "Ice Cream" };

ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, items);

listView1.setAdapter(adapter);
}
}

johnson dubula
April 5, 2016 · Public

i created an app using the java mail api for android but when i send the email google blocks it and says Sign-in attempt prevented,how do i allow it to go thru

johnson dubula  >>  Bucky Roberts
March 31, 2016 · Public

good day guys how do i import projects from github after you download them to the recent version of android studio (android studio 2.0)