package com.example.testscrollview;
import java.util.HashMap;
import java.util.Map;
import android.app.ActionBar.LayoutParams;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
public class MainActivity extends Activity {
ImageView image ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView sample = (TextView) findViewById(R.id.textView1);
sample.setText("hello test");
sample.setBackgroundResource(R.layout.linesample);
}
}
Place this in layout folder
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="line">
<stroke android:width="1dp" android:color="#FFFF00" />
<solid android:color="#00000000" />
<padding android:top="25dp" />
</shape>
</item>
</layer-list>
import java.util.HashMap;
import java.util.Map;
import android.app.ActionBar.LayoutParams;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
public class MainActivity extends Activity {
ImageView image ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView sample = (TextView) findViewById(R.id.textView1);
sample.setText("hello test");
sample.setBackgroundResource(R.layout.linesample);
}
}
Place this in layout folder
linesample.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="line">
<stroke android:width="1dp" android:color="#FFFF00" />
<solid android:color="#00000000" />
<padding android:top="25dp" />
</shape>
</item>
</layer-list>
Thank u sir...
ReplyDeleteEdurub - Edurub provides all latest information on Tech News, Latest information and reviews of gadgets and modded versions of apps and pc applications, and very informative tips about various online platforms.
ReplyDeleteTop Cyber Security Threats.
Newspaper Latest version manual theme activation.
How to Use Old Age Filter in Android: Download Popular Old Age Filter in One click.
Its really awesome try more , fallout shelter no download
ReplyDeleteI love your article.You can visit my website:forgot avast password
ReplyDeletesheck out java books.gretings from my used bookstore
ReplyDeletehi thanku so much sharing this infromation thanku so much
ReplyDeletecs executive
freecseetvideolectures/
hi thanku so much this infromation thanku so much
ReplyDeleteWordpress
milesweb-review
OctaFx Review : A Complete Introduction to Trading Methods and Applications with Concept, Tools, and Techniques for Understanding the Market is a complete course in technical market analysis that focuses on how to navigate the labyrinth of technical tools currently available to financial traders.
ReplyDeleteYour Fxtm Review Account Allows You To Login To Your Account In More Than 1 Country.
ReplyDeleteOh my goodness! Impressive article dude! Thanks, PLease Check my article also.
ReplyDeleteLatest Mod Apps and Games
This comment has been removed by the author.
ReplyDelete