title: Is there a way to make my android device display the xml layout on the fly?
body: <p>I am starting to learn android (through the busy coder's guide book) and I prefer using the commandline tools over the IDE and it's going well so far (in chapter 12 now)</p>
  <p>But I am wondering If i can automate the building process to just display the layout content live (like live server with html web pages)</p>
  <p>instead of just going to the terminal entering the build command and waiting for a few sec or something for the app to upload</p>
  <p>I want:</p>
  <ul>
  <li><p>something like a script on the host side to just execute the below script on changes</p>
  </li>
  <li><p>and on the android side to just keep the app open and update the changes instead of shutting the app off and needs me to restart it again this 10 to 15 secs on every change would make a much difference in my learning process</p>
  </li>
  </ul>
  <p>I use linux debian and the following command line script for building</p>
  <pre><code>target=$1
  
  if  [ &quot;$1&quot; = &quot;&quot; ]; then
      target=&quot;a.apk&quot;
  fi
  
  
  
  aapt package -f -v \
      -I ~/android-sdk/platforms/android-30/android.jar \
      -J src -m \
      -M AndroidManifest.xml \
      -S res \
      -F bin/resources.ap_
  
  javac \
      -bootclasspath ~/android-sdk/platforms/android-30/android.jar \
      -classpath src -source 1.8 -target 1.8 \
      src/dom/domain/*.java
  
  dx --dex --output=bin/classes.dex src
  
  cd bin
  
  mv resources.ap_    $target
  
  aapt add    $target classes.dex
  
  printf 'android\n' | apksigner sign -ks ~/code/android/debug.keystore $target
  
  adb install -r $target
   
  
  </code></pre>