Generally drugs are partially ionic (anionic or ionic), if they fully charged they become a large complex with water molecules and this complex could not cross lipid bilayer. So most of the drug molecules have two parts, one is anionic/cationic and second part is non-ionic. Here is a useful link for you.
Drugs which are weakly acidic or weakly basic exist in the unionized state at all pH values and so they are absorbed from the entire length of GIT by passive diffusion as compared to strongly acidic or strongly basic drugs. Ionized drugs have greater solubility and are poorly absorbed from stomach and GIT. Also find attached an useful article in this context.