How can I replace my basic adapter with custom adapter.Here I didn't change my code to custom adapter. As to my code how should I replace basic adapter with custom adapter to get the messages dynamically into custom adapter. Below I have attached my codes,`
String[] monthsArray={
        "https://www.google.co.in/maps?geo:0,0?q=my+street+address?geo:latitude,longitude"
};
 mHistoryList = new ArrayAdapter<String>(this, android.R.layout.test_list_item);
    //CustomListAdapter mHistoryList=new CustomListAdapter(this,links);
    ListView hlv = (ListView) findViewById(R.id.useHistoryList);
    hlv.setAdapter(mHistoryList);
CustomAdapter Code,
CustomListAdapter mHistoryList=new CustomListAdapter(this,monthsArray);
        ListView list=(ListView)findViewById(R.id.useHistoryList);
           list.setAdapter(mHistoryList);
           list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
              String SelectedItem=monthsArray[+position];
            Toast.makeText(getApplicationContext(),SelectedItem,Toast.LENGTH_SHORT).show();
CustomAdapter.Java file,
private final Context context;
private final String[] links;
public CustomListAdapter(Context context, String[] links) {
    super(context,0,links);
    this.context=context;
    this.links=links;
}
public View getView(int position, View view, ViewGroup parent){
    LayoutInflater inflater= (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View rowView=inflater.inflate(R.layout.link,null,true);
TextView textview=(TextView)rowView.findViewById(R.id.textview);
textview.setText(links[position]);
textview.setMovementMethod(LinkMovementMethod.getInstance());
return rowView;}}
I have kept separate xml file for both listview and textview Xml file,
<ListView
    android:id="@+id/useHistoryList"           
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:divider="#ff505050"
    android:background="#ff202020"
    android:dividerHeight="1dp"
    android:transcriptMode="alwaysScroll"
/>
links.xml file,
<TextView
    android:id="@+id/TextView1"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:autoLink="web"
    >
</TextView>
