[Q] Display data to table - Android Studio

Hi. I can't seem to find solution for displaying data in my app. I already did program in regular Java using jTable and DefaultTableModel for adapting data for my table. But what is alternative in A.Studio? Here is what my app looks like:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and data consists of 3 columns:Name,LastName,PhoneNu. seperated by tab:
Here is example how table looks in Java using SWING:
And here is the code I was planing on using:
Code:
void showData() {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(
openFileInput("phonebook.txt")));
String line;
StringBuffer stringBuffer = new StringBuffer();
try {
while ((line = br.readLine()) != null) {
stringBuffer.append(line + "\n");
}
//textView.setText(stringBuffer.toString());
} catch (IOException e) {
e.printStackTrace();
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
...
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showData();
}
});
Than you for any advice.

Related

Whats the Intent ?

Hey guys,
Im trying something, im just stuck on finding the intent to get to this screen
I can get to this screen
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
using
Code:
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.ManageApplications
I wanna know how i can get to any of the application subscreens so
Is there any intent for going into specific app settings ?
Thanks
Shameless bump Last one on my part just wanna get it out there incase someone knows n they missed the post.
When monitoring the logs to find the intents. I notice it says
/.InstalledAppDetails <has extras>
ne clue as to what these "extras" are ?

[ ICONS | MIUI ] StrokeN ... 76 icons ... 18/01/12

StrokeN Icons. Now 76 icons. Last Update 18/01/12
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
CHANGELOG:
18/01/12 - Add 34 "social \ browsers \ messagers" icons...
Open for requests....
Nice werk and thanx for sharin!
Really nice, can't wait to see it expanded.
Sent from my DHD
I like these! Nice job
UPDATE:
18/01/12 - Add 34 "social \ browsers \ messagers" icons...

[APP] DBH Converter

Hello, i am a computer science & telecommunications student from Greece. I made some free (and also ad-free ) apps for windows phone but only DBH Converter is localized in English so, i will present you this one
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is a tool that allows you to convert numbers from and to Binary, Decimal, Hexadecimal and Octal numeric system. Useful for computer science students and also for developers who want a quick and nice looking app to do their convertions
Download from Marketplace
Version 1.0
Please don't forget to rate. Thank you
My other apps:
Ktel Kozanis
JDM Stopwatch
Screenshots:

[Tweak] Disable Lockscreen Album Art - CM14 [No Xposed required]

Warning, this will only work WITH CM 14, NOT earlier versions.
In a nutshell, this is a modified SystemUI.apk that disables the lockscreen album art feature that was introduced in KK.
In theory, this should not be exclusive to the OPO and should work on all CM 14 builds. HOWEVER, flash at your own risk. I will not be responsible for any bootloops, bricks (impossible to imagine but, ppl never fail to amaze me) or thermonuclear war that may result from flashing this file.
What was modified: https://github.com/CyanogenMod/andr.../systemui/statusbar/phone/PhoneStatusBar.java
In this file, the following was changed:
Code:
public static final boolean SHOW_LOCKSCREEN_MEDIA_ARTWORK = true;
to
Code:
public static final boolean SHOW_LOCKSCREEN_MEDIA_ARTWORK = false;
In this zip, I have included an addon.d script. That way, it should survive dirty flashes.
Special thanks to @danieldmm for compiling the SystemUI.apk. Check out his awesome CM 14 ROM here
Mirror: https://www.dropbox.com/s/m5eg2ed4ui0w99g/NoAlbumArt.zip?dl=0
Screenshot said:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse

How to add more videos to my app

How to add more videos to the app?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I have created an app that contains a video, it works fine now I want to add more video to the list,
here are the codes I used:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
androidaddingLeft="1dp"
androidaddingRight="1dp">
<VideoView
android:id="@+id/vdVw"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
</RelativeLayout>
Maina_Activity.java:
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
public class MainActivity extends AppCompatActivity {
u/Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
VideoView videoView =(VideoView)findViewById(R.id.vdVw);
//Set MediaController to enable play, pause, forward, etc options.
MediaController mediaController= new MediaController(this);
mediaController.setAnchorView(videoView);
//Location of Media File
Uri uri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.video1);
//Starting VideView By Setting MediaController and URI
videoView.setMediaController(mediaController);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();

Categories

Resources