Posts

android - Not scrolling screen -

i have layout file of screen in there gridview elements , lianerlayout lower in shall information on clicking elements in gridview output. here xml file: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearlayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="360dp" android:orientation="vertical" > <relativelayout android:id="@+id/header" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/calendar_top" > <relativelayout an...

XSLT parser/content error xml to text for doctype cesAlign -

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> <xsl:output method="text" encoding="utf-8" /> <xsl:template match="linkgrp"> <xsl:value-of select="normalize-space()"/> <xsl:text>&#xa;</xsl:text> <!-- newline after sentences --> </xsl:template> </xsl:stylesheet> when attempt run above xslt stylesheet on following cesalign xml doc <?xml version="1.0" encoding="utf-8"?> <!doctype cesalign public "-//ces//dtd xml cesalign//en" ""> <cesalign version="1.0"> <linkgrp targtype="s" fromdoc="en/1976/7277/69682_1of1.xml.gz" todoc="zh/1976/7277/4041906_1of1.xml.gz"> <link id="sl0" xtargets=";1" /> <link id="sl1...

xml - Merge two Android projects so that both will appear on layout -

i have android project 2 modules. one banner advertisement , other application. how merge these projects banner ad show on every xml layout of project? i think best way creating baseactivity extends activity. create banner adview java code. extend baseactivity other activities using. here's sample code baseactivity import android.app.activity; import android.os.bundle; public class baseactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); createbanner(); } void createbanner() { //handle banner creation here } } if using fragments navigations have declare banner inside activity's layout xml

How to use selendroid with appium -

i have java maven project runs test of native app in real device using appium. trying use selendroid appium. set capability automationname selendroid , set selendroid port 8080 in appium. app getting launched click or tap not working. need set more. below error appium , code > starting node server > info: welcome appium v1.2.0 (rev e53f49c706a25242e66d36685c268b599cc18da5) > debug: non-default server args: {"address":"127.0.0.1","lognocolors":true,"platformname":"android","platformversion":"18","automation name":"selendroid"} > info: appium rest http interface listener started on 127.0.0.1:4723 > info: loglevel: debug > info: --> post /wd/hub/session {"desiredcapabilities": {"app":"c:\\users\\antony\\workspace\\appiumjustwink\\app\\justw...

java - android change first blank to "AA" -

change first blank "aa" string = "a b c"; change string = "aaab c"; the answer clear a = a.replacefirst(" ", "aa"); try code,you may got expected answer, string str="a b c"; boolean a1 = true ; stringbuilder strbu = new stringbuilder(); for(int i=0 ; i<str.length();i++) { character b = str.charat(i); if(b.equals(' ') && a1 == true ) { a1 = false; strbu = strbu.append("aa"); } else { strbu = strbu.append(b); } } log.e("str","string:"+strbu.tostring());

html - separating <th> elements in a table -

Image
i trying make list of mobile phones website , actual problem @ screenshot here codes thml , css files <th> s must separated border picture : code: <html> <head> <title>mobile phones</title> <link rel="stylesheet" href="styles.css"> </head> <h1>emobile</h1> <div id="wid"> <input type="text" name="manuf" value="დასახელება"></br> <select> <option value="none">მწარმოებელი</option> <option value="nokia">nokia</option> <option value="mercedes">samsung</option> <option value="sony">sony</option> </select> </br> ფილტრაცია ფასით</br> დან:<input type="number" name="from" value="0"> მდე:<input t...

Ruby on Rails: get variable from include do -

yesterday asked quiostion rails 4 enum , got answer. so have defined global status enum in #app/models/concerns/my_enums.rb this: module myenums extend activesupport::concern included enum status: [:active, :inactive, :deleted] end end now im trying defined properties in status enum controller, cannot access enum because initializes when module included , if include in controller i`ll error: undefined method `enum' homecontroller:class how can in controller(like product.statuses)? => {"active"=>0, "inactive"=>1, "deleted"=>2} you cannot include module controller. try: module myenums extend activesupport::concern statuses = [:active, :inactive, :deleted] included enum status: statuses end end and in controller: myenums::statuses