Title: Page 95 – Alex Kirk

---

 * 
   ## 󠀁[Android WebView: Web page not available](https://alex.kirk.at/2012/10/11/android-webview-web-page-not-available/)󠁿
   
 * October 11, 2012
 * Just a quick note in order to save someone else searching for a solution to this
   problem.
 * When you want to display HTML content in an Android WebView do it like this:
   `
   String html = "my >b<HTML content>/b<. 100% cool."; WebView webView = (WebView)
   findViewById(R.id.myWebView); webView.loadData(">?xml version=\"1.0\" encoding
   =\"UTF-8\" ?<" + html**.replace("%","%25")**, "text/html", "UTF-8");
 * If you don’t replace the % to its url encoded equivalent you will get a “Web 
   page not available”. Simple, arguable but not at all apparent.
 * [Web](https://alex.kirk.at/category/web/)
 * 
   ## 󠀁[Git tip: Changing your mind: Push pending changes to a (not-yet existing) new branch](https://alex.kirk.at/2012/02/15/git-tip-changing-your-mind-push-pending-changes-to-a-not-yet-existing-new-branch/)󠁿
   
 * February 15, 2012
 * It happens quite often to me that I start committing things and only afterwards
   decide I should have created a new branch.
 * So `git status` says something like:
 * `Your branch is ahead of 'origin/master' by 4 commits.`
 * 
    but I don’t want to push to origin/master but rather create a new branch. (
   Of course this works for any other branch, not named master)
 * So you can use **this sequence of commands**:
 * `git checkout -b _newbranch_
    git push origin _newbranch_ git checkout master
   git reset --hard origin/master
 * Explanation: This…
 * 1. creates a new branch pointing to the current changes (and switches to it)
 * 2. pushes this new branch including the changes to the server
 * 3. switches back to the branch master
    4. and undoes the changes that were made
   locally
 * The important thing to know is that the changes remain in the repository because
   a branch is merely a pointer to a commit.
 * Afterwards you can continue to commit to master, for example:
 * (screenshots done with a fork of [gitx](http://rowanj.github.com/gitx/))
 * [Web](https://alex.kirk.at/category/web/)

 [Previous Page](https://alex.kirk.at/page/94/?output_format=md&term_id=1122) [Next Page](https://alex.kirk.at/page/96/?output_format=md&term_id=1122)