“And when he had removed him, he raised up unto them David to be their king; to whom also he gave testimony, and said, I have found David the son of Jesse, a man after mine own heart, which shall fulfil all my will.”
King James Version (KJV)
13:22 Having removed him - Hence they might understand that the dispensations of God admit of various changes. I have found David, a man after my own heart - This expression is to be taken in a limited sense. David was such at that time, but not at all times. And he was so, in that respect, as he performed all God's will, in the particulars there mentioned: But he was not a man after God's own heart, in other respects, wherein he performed his own will. In the matter of Uriah, for instance, he was as far from being a man after God's own heart as Saul himself was. It is therefore a very gross, as well as dangerous mistake, to suppose this is the character of David in every part of his behaviour. We must beware of this, unless we would recommend adultery and murder as things after God's own heart. #1Sam 16:12|,13.
Ac 13:22 He raised up unto them David. The Lord called the young shepherd to the throne. A man after mine own heart. The language does not occur in this form in the Old Testament, but is implied in 1Sa 13:14. This does not imply that David was perfect, but that he sought to do the Lord's will, instead of showing stubborn disobedience, like Saul. He exhibited nobility of purpose, sought the welfare of the people, and aimed at a purer life.